Commit d70a6320 authored by Ulrich Weigand's avatar Ulrich Weigand Committed by Alexandre Julliard

Bugfix: NULL pointer check for output parameters.

parent 3132ae40
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment