Jeff Latimer : mpr: Check for out of memory condition.
Alexandre Julliard
julliard at winehq.org
Mon Sep 24 08:07:54 CDT 2007
Module: wine
Branch: master
Commit: c04123fac9386a5125f6f0129f16085ed32654a9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c04123fac9386a5125f6f0129f16085ed32654a9
Author: Jeff Latimer <lats at yless4u.com.au>
Date: Fri Sep 21 23:08:22 2007 +1000
mpr: Check for out of memory condition.
---
dlls/mpr/pwcache.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/mpr/pwcache.c b/dlls/mpr/pwcache.c
index f8d3e32..a760dd2 100644
--- a/dlls/mpr/pwcache.c
+++ b/dlls/mpr/pwcache.c
@@ -56,8 +56,9 @@ static LPSTR MPR_GetValueName( LPCSTR pbResource, WORD cbResource, BYTE nType )
DWORD i;
name = HeapAlloc( GetProcessHeap(), 0, 6+cbResource*2 );
- if( name )
- sprintf( name, "X-%02X-", nType );
+ if( !name ) return NULL;
+
+ sprintf( name, "X-%02X-", nType );
for(i=0; i<cbResource; i++)
{
name[5+i*2]=hex((pbResource[i]&0xf0)>>4);
More information about the wine-cvs
mailing list