fix invalid %m format crash in wide scanf variants
[musl] / 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 {