提交 2dd5dc78 编写于 作者: R Rich Felker

fix over-read in %ls with non-wide scanf

上级 9ab180fa
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册