Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/patch patch(1): use PATH_MAX for the size of rejname



details:   https://anonhg.NetBSD.org/src/rev/bcaa988ab406
branches:  trunk
changeset: 1018863:bcaa988ab406
user:      nia <nia%NetBSD.org@localhost>
date:      Sat Feb 20 09:17:13 2021 +0000

description:
patch(1): use PATH_MAX for the size of rejname

via freebsd, openbsd

diffstat:

 usr.bin/patch/patch.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r a0c6720dec6e -r bcaa988ab406 usr.bin/patch/patch.c
--- a/usr.bin/patch/patch.c     Sat Feb 20 08:59:24 2021 +0000
+++ b/usr.bin/patch/patch.c     Sat Feb 20 09:17:13 2021 +0000
@@ -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    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];



Home | Main Index | Thread Index | Old Index