projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix uninitialized/stale use of alloc (%m modifier) flag in scanf
[musl]
/
src
/
stdio
/
vfscanf.c
diff --git
a/src/stdio/vfscanf.c
b/src/stdio/vfscanf.c
index
bb92848
..
68c8e2c
100644
(file)
--- a/
src/stdio/vfscanf.c
+++ b/
src/stdio/vfscanf.c
@@
-81,6
+81,8
@@
int vfscanf(FILE *restrict f, const char *restrict fmt, va_list ap)
for (p=(const unsigned char *)fmt; *p; p++) {
+ alloc = 0;
+
if (isspace(*p)) {
while (isspace(p[1])) p++;
shlim(f, 0);