make sure the PE is 32-bit and not 64-bit (PE32+)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4873 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
344f759bd5
commit
3e66b3771a
1 changed files with 4 additions and 0 deletions
|
@ -50,6 +50,10 @@ PIMAGE_NT_HEADERS CResourceEditor::GetNTHeaders(BYTE* pbPE) {
|
|||
if (ntHeaders->Signature != IMAGE_NT_SIGNATURE)
|
||||
throw runtime_error("PE file missing NT signature");
|
||||
|
||||
// Make sure this is a 32-bit PE
|
||||
if (ntHeaders->OptionalHeader.Magic != IMAGE_NT_OPTIONAL_HDR32_MAGIC)
|
||||
throw runtime_error("Unsupported PE format");
|
||||
|
||||
return ntHeaders;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue