about summary refs log tree commit diff
path: root/stdio-common/tstscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/tstscanf.c')
-rw-r--r--stdio-common/tstscanf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/stdio-common/tstscanf.c b/stdio-common/tstscanf.c
index 53d4b0ac47..738b25a65e 100644
--- a/stdio-common/tstscanf.c
+++ b/stdio-common/tstscanf.c
@@ -31,6 +31,10 @@ DEFUN(main, (argc, argv), int argc AND char **argv)
 {
   char buf[BUFSIZ];
   FILE *in = stdin, *out = stdout;
+  int x;
+
+  if (sscanf ("0", "%d", &x) != 1)
+    exit (EXIT_FAILURE);
 
   if (argc == 2 && !strcmp (argv[1], "-opipe"))
     {