From 361380a1a5de6a54dddd8c0fe0e4070b1a2a9526 Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 15 Dec 2021 16:29:29 +0000 Subject: [PATCH] The PATH_MAX+1 bites. The PATH_MAX+1 bites. You die... ok millert mlarkin --- games/hack/hack.unix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/games/hack/hack.unix.c b/games/hack/hack.unix.c index a1fdd5a29f5..96a9ca84d2f 100644 --- a/games/hack/hack.unix.c +++ b/games/hack/hack.unix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.unix.c,v 1.20 2016/09/11 14:21:17 tb Exp $ */ +/* $OpenBSD: hack.unix.c,v 1.21 2021/12/15 16:29:29 deraadt Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -160,7 +160,7 @@ void gethdate(char *name) { char *p, *np, *path; - char filename[PATH_MAX+1]; + char filename[PATH_MAX]; if (strchr(name, '/') != NULL || (p = getenv("PATH")) == NULL) p = ""; -- 2.20.1