浏览代码

fix invalid %m format crash in wide scanf variants

the wide variant was missed in the previous commit.
Rich Felker 11 年之前
父节点
当前提交
f0328a5656
共有 1 个文件被更改,包括 2 次插入0 次删除
  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') {
 		if (*p=='m') {
+			wcs = 0;
+			s = 0;
 			alloc = !!dest;
 			alloc = !!dest;
 			p++;
 			p++;
 		} else {
 		} else {