summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-10-30 21:31:39 -0400
committermidipix <writeonce@midipix.org>2016-11-10 23:35:24 -0500
commite5e01868d55406873dae7b45770aed03840faa7e (patch)
tree67e93f24f303ef5fc48ad93905beba036ec40be2 /src
parent1df0b1fdc17f81ec24ceeb4a37f68f3cc58ab830 (diff)
downloadperk-e5e01868d55406873dae7b45770aed03840faa7e.tar.bz2
perk-e5e01868d55406873dae7b45770aed03840faa7e.tar.xz
import lookup table: properly interpret the ordinal/name flag.
Diffstat (limited to 'src')
-rw-r--r--src/main/pe_get_image_meta.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/pe_get_image_meta.c b/src/main/pe_get_image_meta.c
index 0ee8e8e..f52c2e8 100644
--- a/src/main/pe_get_image_meta.c
+++ b/src/main/pe_get_image_meta.c
@@ -169,12 +169,11 @@ int pe_get_image_meta (const struct pe_raw_image * image, struct pe_image_meta *
break;
}
- struct pe_hint_name_entry * pentry = (struct pe_hint_name_entry *)(base + m->hidata->ptr_to_raw_data
- + m->idata[i].items[j].u.hint_name_tbl_rva - m->hidata->virtual_addr);
+ if (!m->idata[i].items[j].flags) {
+ struct pe_hint_name_entry * pentry =
+ (struct pe_hint_name_entry *)(base + m->hidata->ptr_to_raw_data
+ + m->idata[i].items[j].u.hint_name_tbl_rva - m->hidata->virtual_addr);
- if (m->idata[i].items[j].flags)
- m->idata[i].items[j].hint = pe_read_short(pentry->hint);
- else {
m->idata[i].items[j].name = (char *)pentry->name;
#ifdef PERK_DEVEL
printf("%s\n",m->idata[i].items[j].name);