about summary refs log tree commit diff
path: root/stdio-common/scanf13.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/scanf13.c')
-rw-r--r--stdio-common/scanf13.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 720224aa05..60aa62a26f 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -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