advpack: Fix possible NULL pointer access in heap_strdupWtoA.
This commit is contained in:
parent
ac90476211
commit
bafe54e7e5
|
@ -44,6 +44,7 @@ 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);
|
||||
if(ret)
|
||||
WideCharToMultiByte(CP_ACP, 0, str, -1, ret, size, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue