Explorar o código

fix invalid %m format crash in wide scanf variants

the wide variant was missed in the previous commit.
Rich Felker %!s(int64=11) %!d(string=hai) anos
pai
achega
f0328a5656
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/stdio/vfwscanf.c

+ 2 - 0
src/stdio/vfwscanf.c

@@ -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 {