Bugfix: NULL pointer check for output parameters.

This commit is contained in:
Ulrich Weigand 1999-02-09 14:15:48 +00:00 committed by Alexandre Julliard
parent 3132ae4015
commit d70a6320b6
1 changed files with 5 additions and 5 deletions

View File

@ -101,8 +101,8 @@ static BOOL32 find_ne_resource( HFILE32 lzfd, LPCSTR typeid, LPCSTR resid,
}
/* Return resource data */
*resLen = nameInfo->length << *(WORD *)resTab;
*resOff = nameInfo->offset << *(WORD *)resTab;
if ( resLen ) *resLen = nameInfo->length << *(WORD *)resTab;
if ( resOff ) *resOff = nameInfo->offset << *(WORD *)resTab;
HeapFree( GetProcessHeap(), 0, resTab );
return TRUE;
@ -233,9 +233,9 @@ static BOOL32 find_pe_resource( HFILE32 lzfd, LPCSTR typeid, LPCSTR resid,
}
/* Return resource data */
*resLen = resData->Size;
*resOff = resData->OffsetToData - sections[i].VirtualAddress
+ sections[i].PointerToRawData;
if ( resLen ) *resLen = resData->Size;
if ( resOff ) *resOff = resData->OffsetToData - sections[i].VirtualAddress
+ sections[i].PointerToRawData;
HeapFree( GetProcessHeap(), 0, resSection );
HeapFree( GetProcessHeap(), 0, sections );