diff --git a/test/fake_code_signer/pe_header.rb b/test/fake_code_signer/pe_header.rb index 51a5f939..0d19908f 100644 --- a/test/fake_code_signer/pe_header.rb +++ b/test/fake_code_signer/pe_header.rb @@ -46,7 +46,7 @@ def security_address # size of the digital signature def security_size - deref(security_offset + 4) + deref(security_offset + DWORD_SIZE) end private @@ -54,7 +54,7 @@ def security_size # dereferences a pointer # the only pointer type we support is an unsigned long (DWORD) def deref(ptr) - @image[ptr, 4].unpack("L").first + @image[ptr, DWORD_SIZE].unpack("L").first end # offset of e_lfanew (which stores the offset of the actual PE header)