jscript: Fix possible NULL pointer access in heap_strdupW.

This commit is contained in:
André Hentschel 2012-11-17 22:52:29 +01:00 committed by Alexandre Julliard
parent 7e2cac2602
commit 6804ae26fb
1 changed files with 2 additions and 1 deletions

View File

@ -84,7 +84,8 @@ static inline LPWSTR heap_strdupW(LPCWSTR str)
size = (strlenW(str)+1)*sizeof(WCHAR);
ret = heap_alloc(size);
memcpy(ret, str, size);
if(ret)
memcpy(ret, str, size);
}
return ret;