mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-08 14:20:07 +00:00
Fix potential stack overflow [BZ #23490]
Since we are expecting the exact "IBT" string, adjust stack buffer size and scanf format accordingly.
This commit is contained in:
parent
7c9a7c6836
commit
b93f4052fc
@ -1,3 +1,9 @@
|
||||
2018-12-08 Paul Pluzhnikov <ppluzhnikov@google.com>
|
||||
|
||||
[BZ #23490]
|
||||
* sysdeps/unix/sysv/linux/x86/tst-cet-property-2.c
|
||||
(do_test): Adjust buffer size and fix format.
|
||||
|
||||
2018-12-07 DJ Delorie <dj@redhat.com>
|
||||
|
||||
[BZ #23907]
|
||||
|
@ -44,9 +44,9 @@ sig_handler (int signo)
|
||||
static int
|
||||
do_test (void)
|
||||
{
|
||||
char buf[20];
|
||||
char buf[4];
|
||||
|
||||
if (scanf ("%20s", buf) != 1)
|
||||
if (scanf ("%3s", buf) != 1)
|
||||
FAIL_UNSUPPORTED ("IBT not supported");
|
||||
|
||||
if (strcmp (buf, "IBT") != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user