summaryrefslogtreecommitdiffhomepage
path: root/src/reader
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-07-07 03:06:11 +0000
committermidipix <writeonce@midipix.org>2019-07-07 03:12:44 +0000
commit91d87e58ef2e0ba4fecfec0b60f00da8011a9e15 (patch)
treeb37a227d926e22795f1c5e524f88dc4440e1efa2 /src/reader
parentd7016c533d6091d6d4db30845f747b2d1c2610f0 (diff)
downloadperk-91d87e58ef2e0ba4fecfec0b60f00da8011a9e15.tar.bz2
perk-91d87e58ef2e0ba4fecfec0b60f00da8011a9e15.tar.xz
pe_get_image_meta(): fix (cross-size/platform) logic for reading import items.
Diffstat (limited to 'src/reader')
-rw-r--r--src/reader/pe_read_import_header.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/reader/pe_read_import_header.c b/src/reader/pe_read_import_header.c
index cc212af..d76577f 100644
--- a/src/reader/pe_read_import_header.c
+++ b/src/reader/pe_read_import_header.c
@@ -25,18 +25,18 @@ int pe_read_import_header(const struct pe_raw_import_hdr * p, struct pe_meta_imp
}
int pe_read_import_lookup(
- const union pe_raw_import_lookup * p,
+ const unsigned char * p,
struct pe_meta_import_lookup * m,
uint32_t magic)
{
switch (magic) {
case PE_MAGIC_PE32:
- m->u.ii_import_lookup_entry_64 = pe_read_long(p->ii_import_lookup_entry_32);
+ m->u.ii_import_lookup_entry_64 = pe_read_long(p);
m->ii_flag = (uint32_t)m->u.ii_import_lookup_entry_64 >> 31;
break;
case PE_MAGIC_PE32_PLUS:
- m->u.ii_import_lookup_entry_64 = pe_read_quad(p->ii_import_lookup_entry_64);
+ m->u.ii_import_lookup_entry_64 = pe_read_quad(p);
m->ii_flag = m->u.ii_import_lookup_entry_64 >> 63;
break;