From 6804ae26fbee19603beb6b310f53eb07c48145cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Sat, 17 Nov 2012 22:52:29 +0100 Subject: [PATCH] jscript: Fix possible NULL pointer access in heap_strdupW. --- dlls/jscript/jscript.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 6b7c5a16ec7..0ab2e065038 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;