Commit bafe54e7 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

advpack: Fix possible NULL pointer access in heap_strdupWtoA.

parent ac904762
......@@ -44,7 +44,8 @@ static inline char *heap_strdupWtoA(const WCHAR *str)
if(str) {
size_t size = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
ret = heap_alloc(size);
WideCharToMultiByte(CP_ACP, 0, str, -1, ret, size, NULL, NULL);
if(ret)
WideCharToMultiByte(CP_ACP, 0, str, -1, ret, size, NULL, NULL);
}
return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment