mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
Fix missing NUL terminator in stdio-common/scanf13 test
sscanf is only defined on nul terminated string input, but '\0' was missing in this test which caused _IO_str_init_static_internal to read OOB on the stack when computing the bounds of the string. Reviewed-by: Florian Weimer <fweimer@redhat.com>
This commit is contained in:
parent
6a3794ea91
commit
b866018f54
@ -67,6 +67,7 @@ main (void)
|
||||
buf[2049] = 0x84;
|
||||
buf[2058] = '\t';
|
||||
buf[2059] = 'a';
|
||||
buf[sizeof (buf) - 1] = '\0';
|
||||
if (sscanf (buf, "%ms%mc", &sp1, &sp2) != 2)
|
||||
FAIL ();
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user