diff options
author | Stefan Liebler <stli@linux.ibm.com> | 2018-09-06 14:27:03 +0200 |
---|---|---|
committer | Stefan Liebler <stli@linux.ibm.com> | 2018-09-06 14:27:03 +0200 |
commit | 28669f86f6780a18daca264f32d66b1428c9c6f1 (patch) | |
tree | 5d84685410e38ea533838ad1785ad4d037b302a5 /malloc | |
parent | a33650d1a63b4e5d52ef02bb629d045c217e16ff (diff) | |
download | glibc-28669f86f6780a18daca264f32d66b1428c9c6f1.tar.gz glibc-28669f86f6780a18daca264f32d66b1428c9c6f1.tar.xz glibc-28669f86f6780a18daca264f32d66b1428c9c6f1.zip |
Fix segfault in maybe_script_execute.
If glibc is built with gcc 8 and -march=z900, the testcase posix/tst-spawn4-compat crashes with a segfault. In function maybe_script_execute, the new_argv array is dynamically initialized on stack with (argc + 1) elements. The function wants to add _PATH_BSHELL as the first argument and writes out of bounds of new_argv. There is an off-by-one because maybe_script_execute fails to count the terminating NULL when sizing new_argv. ChangeLog: * sysdeps/unix/sysv/linux/spawni.c (maybe_script_execute): Increment size of new_argv by one.
Diffstat (limited to 'malloc')
0 files changed, 0 insertions, 0 deletions