Bugfix: NULL pointer check for output parameters.
This commit is contained in:
parent
3132ae4015
commit
d70a6320b6
|
@ -101,8 +101,8 @@ static BOOL32 find_ne_resource( HFILE32 lzfd, LPCSTR typeid, LPCSTR resid,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return resource data */
|
/* Return resource data */
|
||||||
*resLen = nameInfo->length << *(WORD *)resTab;
|
if ( resLen ) *resLen = nameInfo->length << *(WORD *)resTab;
|
||||||
*resOff = nameInfo->offset << *(WORD *)resTab;
|
if ( resOff ) *resOff = nameInfo->offset << *(WORD *)resTab;
|
||||||
|
|
||||||
HeapFree( GetProcessHeap(), 0, resTab );
|
HeapFree( GetProcessHeap(), 0, resTab );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -233,8 +233,8 @@ static BOOL32 find_pe_resource( HFILE32 lzfd, LPCSTR typeid, LPCSTR resid,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return resource data */
|
/* Return resource data */
|
||||||
*resLen = resData->Size;
|
if ( resLen ) *resLen = resData->Size;
|
||||||
*resOff = resData->OffsetToData - sections[i].VirtualAddress
|
if ( resOff ) *resOff = resData->OffsetToData - sections[i].VirtualAddress
|
||||||
+ sections[i].PointerToRawData;
|
+ sections[i].PointerToRawData;
|
||||||
|
|
||||||
HeapFree( GetProcessHeap(), 0, resSection );
|
HeapFree( GetProcessHeap(), 0, resSection );
|
||||||
|
|
Loading…
Reference in New Issue