mirror of
https://github.com/pesde-pkg/tooling.git
synced 2025-03-04 02:51:47 +00:00
fix(lib): windows PE format detection offset being a u32
This commit is contained in:
parent
f4f05b8264
commit
14860284da
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ return function(binaryContents: buffer): ExecutableDetectionResult?
|
||||||
|
|
||||||
if buffer.readstring(binaryContents, 0, 2) == DOS_HEADER then
|
if buffer.readstring(binaryContents, 0, 2) == DOS_HEADER then
|
||||||
-- File was a DOS executable, jump to PE header to get the magic offset
|
-- File was a DOS executable, jump to PE header to get the magic offset
|
||||||
local signatureOffset = buffer.readu8(binaryContents, PE_HEADER_OFFSET)
|
local signatureOffset = buffer.readu32(binaryContents, PE_HEADER_OFFSET)
|
||||||
|
|
||||||
-- Check if the value at the magic offset was the PE magic signature
|
-- Check if the value at the magic offset was the PE magic signature
|
||||||
if buffer.readstring(binaryContents, signatureOffset, 4) == PE_MAGIC_SIGNATURE then
|
if buffer.readstring(binaryContents, signatureOffset, 4) == PE_MAGIC_SIGNATURE then
|
||||||
|
|
Loading…
Add table
Reference in a new issue