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 44fac78e0f069086ab3ebcaaccd3eb8db6a80b6e..75f04d725719f412328b7fcb8f143d88fa14a479 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 {