diff options
author | midipix <writeonce@midipix.org> | 2018-11-17 23:06:17 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-11-20 20:25:17 -0500 |
commit | 2bae5fde60d0cad9203b554f36d6724dbc255c30 (patch) | |
tree | ba1c44958480935f31886de9087038295d2b084c /src/logic | |
parent | 0a52ca80ff2bdaae33fb7e3774956af5ee5adb1a (diff) | |
download | perk-2bae5fde60d0cad9203b554f36d6724dbc255c30.tar.bz2 perk-2bae5fde60d0cad9203b554f36d6724dbc255c30.tar.xz |
pe_get_image_meta(): properly read the import-by-ordinal import lookup flag.
Diffstat (limited to 'src/logic')
-rw-r--r-- | src/logic/pe_get_image_meta.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c index 37df3f7..7ec2b0b 100644 --- a/src/logic/pe_get_image_meta.c +++ b/src/logic/pe_get_image_meta.c @@ -468,15 +468,15 @@ int pe_get_image_meta( switch (m->m_opt.oh_std.coh_magic) { case PE_MAGIC_PE32: - m->m_idata[i].ih_items[j].ii_flags = m->m_idata[i].ih_items[j].u.ii_import_lookup_entry_32; + m->m_idata[i].ih_items[j].ii_flag = m->m_idata[i].ih_items[j].u.ii_import_lookup_entry_32 >> 31; break; case PE_MAGIC_PE32_PLUS: - m->m_idata[i].ih_items[j].ii_flags = (m->m_idata[i].ih_items[j].u.ii_import_lookup_entry_64 >> 32); + m->m_idata[i].ih_items[j].ii_flag = (m->m_idata[i].ih_items[j].u.ii_import_lookup_entry_64 >> 63); break; } - if (!m->m_idata[i].ih_items[j].ii_flags) { + if (!m->m_idata[i].ih_items[j].ii_flag) { struct pe_raw_hint_name_entry * pentry = (struct pe_raw_hint_name_entry *)(base + m->h_idata->sh_ptr_to_raw_data + m->m_idata[i].ih_items[j].u.ii_hint_name_tbl_rva - m->h_idata->sh_virtual_addr); |