From 32b7d2e3b81e54563fd902d640445b4587b08c53 Mon Sep 17 00:00:00 2001 From: John Mair Date: Thu, 14 Dec 2017 05:40:57 +0100 Subject: [PATCH] use DWORD_SIZE in more places --- test/fake_code_signer/pe_header.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)