summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/vfscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/vfscanf.c')
-rw-r--r--lib/libc/stdio/vfscanf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c
index f26db86..f2699b8 100644
--- a/lib/libc/stdio/vfscanf.c
+++ b/lib/libc/stdio/vfscanf.c
@@ -677,7 +677,10 @@ __sccl(tab, fmt)
c = *fmt++; /* get new first char */
} else
v = 0; /* default => reject */
+
+ /* XXX: Will not work if sizeof(tab*) > sizeof(char) */
(void) memset(tab, v, 256);
+
if (c == 0)
return (fmt - 1);/* format ended before closing ] */
OpenPOWER on IntegriCloud