=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: msxml3: Fix possible NULL pointer access in heap_strdupW.
Alexandre Julliard
julliard at winehq.org
Mon Nov 19 13:38:39 CST 2012
Module: wine
Branch: master
Commit: c02b84d3c5f041942a46d5e87d9965a5e86989ff
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c02b84d3c5f041942a46d5e87d9965a5e86989ff
Author: André Hentschel <nerv at dawncrow.de>
Date: Sat Nov 17 22:52:35 2012 +0100
msxml3: Fix possible NULL pointer access in heap_strdupW.
---
dlls/msxml3/msxml_private.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h
index 503a580..66baea8 100644
--- a/dlls/msxml3/msxml_private.h
+++ b/dlls/msxml3/msxml_private.h
@@ -194,7 +194,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;
More information about the wine-cvs
mailing list