summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-11-19 12:34:42 -0500
committermidipix <writeonce@midipix.org>2016-11-19 12:34:42 -0500
commit3161deb4b53f4683624ebd93d3d0945f4ed92576 (patch)
tree9bae55fafc099c040c4298cc34f76986a6bdb9ba /src
parent8dd726502b05e31022104aac81ae901617827773 (diff)
downloadperk-3161deb4b53f4683624ebd93d3d0945f4ed92576.tar.bz2
perk-3161deb4b53f4683624ebd93d3d0945f4ed92576.tar.xz
PE format: union pe_import_lookup_item [and co.] --> union pe_import_lookup.
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) {