projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ab180f
)
fix over-read in %ls with non-wide scanf
author
Rich Felker
<dalias@aerifal.cx>
Wed, 18 Apr 2012 02:41:38 +0000
(22:41 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Wed, 18 Apr 2012 02:41:38 +0000
(22:41 -0400)
src/stdio/vfscanf.c
patch
|
blob
|
history
diff --git
a/src/stdio/vfscanf.c
b/src/stdio/vfscanf.c
index 8be0d91c6689a7fe697b3a03a0444b863aef479d..73294cdb990770cb3ea65a0036c17f41f1b996ae 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;
}
+ shunget(f);
if (!mbsinit(&st)) goto input_fail;
if (dest) *wcs++ = 0;
break;