Jeff Latimer : mpr: Check for out of memory condition.
Module: wine Branch: master Commit: c04123fac9386a5125f6f0129f16085ed32654a9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c04123fac9386a5125f6f0129f... Author: Jeff Latimer <lats(a)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);
participants (1)
-
Alexandre Julliard