fix invalid %m format crash in wide scanf variants
authorRich Felker <dalias@aerifal.cx>
Sun, 1 Sep 2013 02:52:41 +0000 (22:52 -0400)
committerRich Felker <dalias@aerifal.cx>
Sun, 1 Sep 2013 02:52:41 +0000 (22:52 -0400)
the wide variant was missed in the previous commit.

src/stdio/vfwscanf.c

index 44fac78..75f04d7 100644 (file)
@@ -143,6 +143,8 @@ int vfwscanf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap)
                }
 
                if (*p=='m') {
+                       wcs = 0;
+                       s = 0;
                        alloc = !!dest;
                        p++;
                } else {