Merge pull request #29327 from aiburegit/main

rootless: fix heap-buffer-overflow in preexec hooks
This commit is contained in:
Matt Heon authored and GitHub committed 2026-08-04 20:42:07 -04:00
commit de06abeb56
1 file changed
-1
-1
View File
@@ -447,7 +447,6 @@ do_preexec_hooks_dir (const char *dir, char **argv, int argc)
strncpy (buffer + nfiles * (NAME_MAX + 1), de->d_name, NAME_MAX + 1);
nfiles++;
buffer[nfiles * (NAME_MAX + 1)] = '\0';
}
qsort (buffer, nfiles, NAME_MAX + 1, (int (*)(const void *, const void *)) strcmp);