mirror of
https://github.com/containers/podman.git
synced 2026-10-09 19:52:33 -04:00
Merge pull request #29327 from aiburegit/main
rootless: fix heap-buffer-overflow in preexec hooks
This commit is contained in:
1 file changed
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user