diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/logic/pe_get_image_meta.c | 6 | ||||
-rw-r--r-- | src/reader/pe_read_import_header.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c index 9dd0481..6d90b37 100644 --- a/src/logic/pe_get_image_meta.c +++ b/src/logic/pe_get_image_meta.c @@ -105,7 +105,7 @@ int pe_get_image_meta(const struct pe_raw_image * image, struct pe_image_meta ** /* .idata */ struct pe_import_hdr * pidata; - struct pe_import_lookup_item * pitem; + union pe_import_lookup_item * pitem; i = pe_get_named_section_index(m,".idata"); s = pe_get_block_section_index(m,&m->opt.dirs.import_tbl); @@ -137,13 +137,13 @@ int pe_get_image_meta(const struct pe_raw_image * image, struct pe_image_meta ** + m->idata[i].name_rva - m->hidata->virtual_addr; if (m->idata[i].import_lookup_tbl_rva) - m->idata[i].aitems = (struct pe_import_lookup_item *)(base + m->hidata->ptr_to_raw_data + m->idata[i].aitems = (union pe_import_lookup_item *)(base + m->hidata->ptr_to_raw_data + m->idata[i].import_lookup_tbl_rva - m->hidata->virtual_addr); /* items */ m->idata[i].count = 0; if (m->idata[i].import_lookup_tbl_rva) { - for (pitem=m->idata[i].aitems; *(uint32_t *)pitem->u.hint_name_tbl_rva; pitem++) + for (pitem=m->idata[i].aitems; *(uint32_t *)pitem->hint_name_tbl_rva; pitem++) m->idata[i].count++; if (!(m->idata[i].items = calloc(m->idata[i].count,sizeof(*(m->idata[i].items))))) diff --git a/src/reader/pe_read_import_header.c b/src/reader/pe_read_import_header.c index 50434e4..885adf6 100644 --- a/src/reader/pe_read_import_header.c +++ b/src/reader/pe_read_import_header.c @@ -27,17 +27,17 @@ int pe_read_import_header(const struct pe_import_hdr * p, struct pe_meta_import_ } int pe_read_import_lookup_item( - const struct pe_import_lookup_item * p, + const union pe_import_lookup_item * p, struct pe_meta_import_lookup_item * m, uint32_t magic) { switch (magic) { case PE_MAGIC_PE32: - m->u.import_lookup_entry_64 = pe_read_long(p->u.import_lookup_entry_32); + m->u.import_lookup_entry_64 = pe_read_long(p->import_lookup_entry_32); return 0; case PE_MAGIC_PE32_PLUS: - m->u.import_lookup_entry_64 = pe_read_quad(p->u.import_lookup_entry_64); + m->u.import_lookup_entry_64 = pe_read_quad(p->import_lookup_entry_64); return 0; default: |