Open GoogleCodeExporter opened 9 years ago
Forgot to mention, tinyW7x64.asm works fine.
Original comment by thecybershadow
on 6 Sep 2014 at 12:12
Here's a fixed version.
Changes:
1. LdrpCheckForSecuROMImage is looking through IMAGE_DIRECTORY_ENTRY_DEBUG. The
directory entry fell square in the middle of the text message, which caused
that ASCII-looking invalid pointer dereference (0x57682042 is 'B hW', minus
0x00400010 that's '2 (W', the fragment from "PE32 (W7"). I resolved this simply
by moving the message after the IMAGE_IMPORT_DESCRIPTOR entries, that way the
debug directory entry overlaps with the nul bytes in the second
IMAGE_IMPORT_DESCRIPTOR.
2. LdrpCheckForSafeDiscImage was doing a strncmp with an address calculated
using IMAGE_OPTIONAL_HEADER.SizeOfHeaders. I filled that in (and adjusted
SizeOfImage, which can't be smaller than SizeOfHeaders apparently).
Original comment by thecybershadow
on 6 Sep 2014 at 6:24
Original issue reported on code.google.com by
thecybershadow
on 6 Sep 2014 at 12:08