mirror of
https://github.com/fluencelabs/musl
synced 2025-07-02 16:12:02 +00:00
fix over-read in %ls with non-wide scanf
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user