diff options
author | midipix <writeonce@midipix.org> | 2016-11-15 23:42:07 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-15 23:42:07 -0500 |
commit | 51aab1f18f156e876aad4875119c535205b9e8f9 (patch) | |
tree | 42462132bd56052ad5310652887242a9395226f1 /src | |
parent | dfb987175431656ccbee4f629d2cce4d824ce681 (diff) | |
download | perk-51aab1f18f156e876aad4875119c535205b9e8f9.tar.bz2 perk-51aab1f18f156e876aad4875119c535205b9e8f9.tar.xz |
pe_read_coff_header(): code clean-up.
Diffstat (limited to 'src')
-rw-r--r-- | src/reader/pe_read_coff_header.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/reader/pe_read_coff_header.c b/src/reader/pe_read_coff_header.c index 5ee62e3..24d47ba 100644 --- a/src/reader/pe_read_coff_header.c +++ b/src/reader/pe_read_coff_header.c @@ -12,9 +12,8 @@ int pe_read_coff_header(const struct pe_coff_file_hdr * p, struct pe_meta_coff_file_hdr * m) { - uint16_t * pzero = (uint16_t *)&p->signature[2]; - - if ((p->signature[0] != 'P') || (p->signature[1] != 'E') || *pzero) + if ((p->signature[0] != 'P') || (p->signature[1] != 'E') + || p->signature[2] || p->signature[3]) return PERK_ERR_BAD_COFF_HEADER; if (PERK_LITTLE_ENDIAN) { |