]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Buffer overrun detected by Intel MPX in stdio-common/scanf13.c. Fixed.
authorLiubov Dmitrieva <liubov.dmitrieva@intel.com>
Wed, 19 Dec 2012 14:56:40 +0000 (18:56 +0400)
committerLiubov Dmitrieva <ldmitrie@sourceware.org>
Wed, 23 Oct 2013 15:07:37 +0000 (19:07 +0400)
stdio-common/scanf13.c

index 720224aa05f97abe06d131d0fbd5403e9bc89d57..aa58dd5d4abb2e77683ebb868cb31eb9df477053 100644 (file)
@@ -59,6 +59,7 @@ main (void)
     }
 
   memset (buf, '/', sizeof (buf));
+  buf[sizeof(buf) - 1] = 0;
   buf[0] = '\t';
   buf[1] = ' ';
   buf[2] = 0xc3;