summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/logic/pe_get_image_meta.c4
-rw-r--r--src/reader/pe_read_import_header.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c
index a722550..0a8de47 100644
--- a/src/logic/pe_get_image_meta.c
+++ b/src/logic/pe_get_image_meta.c
@@ -243,7 +243,7 @@ int pe_get_image_meta(
/* .idata */
struct pe_import_hdr * pidata;
- union pe_import_lookup_item * pitem;
+ union pe_import_lookup * pitem;
i = pe_get_named_section_index(m,".idata");
s = pe_get_block_section_index(m,&m->opt.dirs.import_tbl);
@@ -278,7 +278,7 @@ int pe_get_image_meta(
+ m->idata[i].name_rva - m->hidata->virtual_addr;
if (m->idata[i].import_lookup_tbl_rva)
- m->idata[i].aitems = (union pe_import_lookup_item *)(base + m->hidata->ptr_to_raw_data
+ m->idata[i].aitems = (union pe_import_lookup *)(base + m->hidata->ptr_to_raw_data
+ m->idata[i].import_lookup_tbl_rva - m->hidata->virtual_addr);
/* items */
diff --git a/src/reader/pe_read_import_header.c b/src/reader/pe_read_import_header.c
index 7616cff..e656185 100644
--- a/src/reader/pe_read_import_header.c
+++ b/src/reader/pe_read_import_header.c
@@ -25,8 +25,8 @@ int pe_read_import_header(const struct pe_import_hdr * p, struct pe_meta_import_
}
int pe_read_import_lookup(
- const union pe_import_lookup_item * p,
- struct pe_meta_import_lookup_item * m,
+ const union pe_import_lookup * p,
+ struct pe_meta_import_lookup * m,
uint32_t magic)
{
switch (magic) {