Re: [1/2] version: zero pad section up to virtual size
11 Nov
2010
11 Nov
'10
12:11 p.m.
Ričardas Barkauskas <miegalius(a)gmail.com> writes:
@@ -282,8 +282,12 @@ static BOOL find_pe_resource( HFILE lzfd, DWORD *resLen, DWORD *resOff ) }
/* Read in resource section */ - resSectionSize = sections[i].SizeOfRawData; - resSection = HeapAlloc( GetProcessHeap(), 0, resSectionSize ); + if ( sections[i].SizeOfRawData < sections[i].Misc.VirtualSize ) + resSectionSize = sections[i].SizeOfRawData; + else + resSectionSize = sections[i].Misc.VirtualSize; + + resSection = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sections[i].Misc.VirtualSize );
That won't work, the data won't be zero since you'll be reading from the filepast the end of the section. -- Alexandre Julliard julliard(a)winehq.org
5600
Age (days ago)
5600
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard