]> Savannah Git Hosting - gnulib.git/commitdiff
vc-mtime: Fix a buffer overflow.
authorBruno Haible <bruno@clisp.org>
Sun, 4 May 2025 16:21:01 +0000 (18:21 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 4 May 2025 16:21:01 +0000 (18:21 +0200)
* lib/vc-mtime.c (max_vc_mtime): Increase the size of argv by one
element.

ChangeLog
lib/vc-mtime.c

index d03b62cc9f5e1653f84d562998fa3f58fa8c9360..9d7d64f7a75933c705259744d496b3a199e3e322 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-05-04  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        getlocalename_l-unsafe: Fix typo in comment.
index 4091e341238799b1b997ab27a38ee055ebf28947..ad529ea317062d0754b5a8acba86c2eef9cd72e5 100644 (file)
@@ -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