Marcus Meissner : localspl: Check for NULL return from HeapAlloc.
Alexandre Julliard
julliard at winehq.org
Mon Oct 19 09:56:11 CDT 2009
Module: wine
Branch: master
Commit: 1aee3595423a8aa15e3560d764001129263bce10
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1aee3595423a8aa15e3560d764001129263bce10
Author: Marcus Meissner <marcus at jet.franken.de>
Date: Sat Oct 17 12:40:42 2009 +0200
localspl: Check for NULL return from HeapAlloc.
---
dlls/localspl/provider.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/localspl/provider.c b/dlls/localspl/provider.c
index e032a8e..8c6a940 100644
--- a/dlls/localspl/provider.c
+++ b/dlls/localspl/provider.c
@@ -193,7 +193,7 @@ static LPWSTR strdupW(LPCWSTR p)
if(!p) return NULL;
len = (lstrlenW(p) + 1) * sizeof(WCHAR);
ret = heap_alloc(len);
- memcpy(ret, p, len);
+ if (ret) memcpy(ret, p, len);
return ret;
}
More information about the wine-cvs
mailing list