Module Name: src Committed By: nia Date: Sat Feb 20 09:17:13 UTC 2021
Modified Files: src/usr.bin/patch: patch.c Log Message: patch(1): use PATH_MAX for the size of rejname via freebsd, openbsd To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.bin/patch/patch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/patch/patch.c diff -u src/usr.bin/patch/patch.c:1.30 src/usr.bin/patch/patch.c:1.31 --- src/usr.bin/patch/patch.c:1.30 Fri Feb 19 17:46:53 2021 +++ src/usr.bin/patch/patch.c Sat Feb 20 09:17:13 2021 @@ -1,7 +1,7 @@ /* * $OpenBSD: patch.c,v 1.45 2007/04/18 21:52:24 sobrado Exp $ * $DragonFly: src/usr.bin/patch/patch.c,v 1.10 2008/08/10 23:39:56 joerg Exp $ - * $NetBSD: patch.c,v 1.30 2021/02/19 17:46:53 nia Exp $ + * $NetBSD: patch.c,v 1.31 2021/02/20 09:17:13 nia Exp $ */ /* @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: patch.c,v 1.30 2021/02/19 17:46:53 nia Exp $"); +__RCSID("$NetBSD: patch.c,v 1.31 2021/02/20 09:17:13 nia Exp $"); #include <sys/types.h> #include <sys/stat.h> @@ -115,7 +115,7 @@ static bool remove_empty_files = false; static bool reverse_flag_specified = false; /* buffer holding the name of the rejected patch file. */ -static char rejname[NAME_MAX + 1]; +static char rejname[PATH_MAX]; /* buffer for stderr */ static char serrbuf[BUFSIZ];