summaryrefslogtreecommitdiffhomepage
path: root/src/headers/pe_get_image_coff_hdr_addr.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-11-30 19:17:23 -0500
committermidipix <writeonce@midipix.org>2016-11-30 19:17:23 -0500
commit12bebb7780b8bef12565337ad4dca4da80b02f79 (patch)
tree5435c3c37c065c64a1bf1372982dddcf4be7d930 /src/headers/pe_get_image_coff_hdr_addr.c
parentc34a35179e922620229413cb9eb0f18cfc33076e (diff)
downloadpemagine-12bebb7780b8bef12565337ad4dca4da80b02f79.tar.bz2
pemagine-12bebb7780b8bef12565337ad4dca4da80b02f79.tar.xz
struct pe_raw_coff_file_hdr: member name normalization.
Diffstat (limited to 'src/headers/pe_get_image_coff_hdr_addr.c')
-rw-r--r--src/headers/pe_get_image_coff_hdr_addr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/headers/pe_get_image_coff_hdr_addr.c b/src/headers/pe_get_image_coff_hdr_addr.c
index 8da5f8c..a4d6711 100644
--- a/src/headers/pe_get_image_coff_hdr_addr.c
+++ b/src/headers/pe_get_image_coff_hdr_addr.c
@@ -22,9 +22,9 @@ struct pe_raw_coff_file_hdr * pe_get_image_coff_hdr_addr(const void * base)
offset = (uint32_t *)(dos->dos_lfanew);
coff = (struct pe_raw_coff_file_hdr *)pe_va_from_rva(base,*offset);
- return ((coff->signature[0] == 'P')
- && (coff->signature[1] == 'E')
- && (coff->signature[2] == '\0')
- && (coff->signature[3] == '\0'))
+ return ((coff->cfh_signature[0] == 'P')
+ && (coff->cfh_signature[1] == 'E')
+ && (coff->cfh_signature[2] == '\0')
+ && (coff->cfh_signature[3] == '\0'))
? coff : 0;
}