From: Bruno Haible Date: Sun, 4 May 2025 16:21:01 +0000 (+0200) Subject: vc-mtime: Fix a buffer overflow. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c09896d8bd6e4719cd22396a682a697fbc2322cd;p=thirdparty%2Fgnulib.git vc-mtime: Fix a buffer overflow. * lib/vc-mtime.c (max_vc_mtime): Increase the size of argv by one element. --- diff --git a/ChangeLog b/ChangeLog index d03b62cc9f..9d7d64f7a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2025-05-04 Bruno Haible + + vc-mtime: Fix a buffer overflow. + * lib/vc-mtime.c (max_vc_mtime): Increase the size of argv by one + element. + 2025-05-04 Bruno Haible getlocalename_l-unsafe: Fix typo in comment. diff --git a/lib/vc-mtime.c b/lib/vc-mtime.c index 4091e34123..ad529ea317 100644 --- a/lib/vc-mtime.c +++ b/lib/vc-mtime.c @@ -573,7 +573,7 @@ max_vc_mtime (struct timespec *max_of_mtimes, } /* Room for passing arguments to git commands. */ - const char **argv = XNMALLOC (6 + nfiles + 1, const char *); + const char **argv = XNMALLOC (7 + nfiles + 1, const char *); { /* Put the relative file names into a hash table. This is needed