about summary refs log tree commit diff
path: root/wctype/wctype.c
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.ibm.com>2018-09-06 14:27:03 +0200
committerStefan Liebler <stli@linux.ibm.com>2018-09-10 14:22:52 +0200
commit1fe2b9ca8a50aaa789d72944b5a91f1d35337adc (patch)
tree1d637020bce4fbf6fec6e23092a19b13284e1a1f /wctype/wctype.c
parent0b79004569e5ce1669136b8c41564c3809730f15 (diff)
downloadglibc-1fe2b9ca8a50aaa789d72944b5a91f1d35337adc.tar.gz
glibc-1fe2b9ca8a50aaa789d72944b5a91f1d35337adc.tar.xz
glibc-1fe2b9ca8a50aaa789d72944b5a91f1d35337adc.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.

(cherry picked from commit 28669f86f6780a18daca264f32d66b1428c9c6f1)
Diffstat (limited to 'wctype/wctype.c')
0 files changed, 0 insertions, 0 deletions