From eee8131d3ba53daa85303602046e7523a04a3a10 Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Mon, 18 Dec 2017 22:33:08 +0800 Subject: [PATCH] winecfg: Fix a crash when inputting non-ASCII dll override name. Signed-off-by: Zhiyi Zhang Signed-off-by: Alexandre Julliard --- programs/winecfg/winecfg.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/programs/winecfg/winecfg.c b/programs/winecfg/winecfg.c index dbac92925b7..ba317c7755b 100644 --- a/programs/winecfg/winecfg.c +++ b/programs/winecfg/winecfg.c @@ -571,7 +571,7 @@ char **enumerate_values(HKEY root, char *path) WCHAR *wpath; WCHAR **wret; char **ret=NULL; - int i=0, len=0; + int i=0, len=0, size; wpath = HeapAlloc(GetProcessHeap(), 0, (strlen(path)+1)*sizeof(WCHAR)); MultiByteToWideChar(CP_ACP, 0, path, -1, wpath, strlen(path)+1); @@ -586,11 +586,13 @@ char **enumerate_values(HKEY root, char *path) /* convert WCHAR ** to char ** and HeapFree each WCHAR * element on our way */ for (i=0; i