Module: wine Branch: master Commit: 6804ae26fbee19603beb6b310f53eb07c48145cc URL: http://source.winehq.org/git/wine.git/?a=commit;h=6804ae26fbee19603beb6b310f...
Author: André Hentschel nerv@dawncrow.de Date: Sat Nov 17 22:52:29 2012 +0100
jscript: Fix possible NULL pointer access in heap_strdupW.
---
dlls/jscript/jscript.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 6b7c5a1..0ab2e06 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -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;