projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix over-read in %ls with non-wide scanf
[musl]
/
src
/
stdio
/
vfscanf.c
diff --git
a/src/stdio/vfscanf.c
b/src/stdio/vfscanf.c
index
8be0d91
..
73294cd
100644
(file)
--- a/
src/stdio/vfscanf.c
+++ b/
src/stdio/vfscanf.c
@@
-312,6
+312,7
@@
int vfscanf(FILE *f, const char *fmt, va_list ap)
if (readwc(c, &wcs, &st) < 0)
goto input_fail;
}
if (readwc(c, &wcs, &st) < 0)
goto input_fail;
}
+ shunget(f);
if (!mbsinit(&st)) goto input_fail;
if (dest) *wcs++ = 0;
break;
if (!mbsinit(&st)) goto input_fail;
if (dest) *wcs++ = 0;
break;