From c04123fac9386a5125f6f0129f16085ed32654a9 Mon Sep 17 00:00:00 2001 From: Jeff Latimer Date: Fri, 21 Sep 2007 23:08:22 +1000 Subject: [PATCH] mpr: Check for out of memory condition. --- dlls/mpr/pwcache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/mpr/pwcache.c b/dlls/mpr/pwcache.c index f8d3e322041..a760dd26d25 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>4);