diff options
author | midipix <writeonce@midipix.org> | 2016-12-01 08:29:34 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-12-01 08:29:34 -0500 |
commit | f845bd25e705125bb60762f9ac43fba1aaef1cdc (patch) | |
tree | 72bfc66d208e6835978bc6357c0a3b9b85ab3a7c /src | |
parent | 44d09635402c850ef7174626c119e1200eb7099a (diff) | |
download | perk-f845bd25e705125bb60762f9ac43fba1aaef1cdc.tar.bz2 perk-f845bd25e705125bb60762f9ac43fba1aaef1cdc.tar.xz |
{union|struct} pe_{raw|meta}_import_lookup: member name normalization.
Diffstat (limited to 'src')
-rw-r--r-- | src/logic/pe_get_image_meta.c | 14 | ||||
-rw-r--r-- | src/output/pe_output_import_libraries.c | 4 | ||||
-rw-r--r-- | src/reader/pe_read_import_header.c | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c index 9353ac4..7e0bbf2 100644 --- a/src/logic/pe_get_image_meta.c +++ b/src/logic/pe_get_image_meta.c @@ -287,9 +287,9 @@ int pe_get_image_meta( if (m->idata[i].import_lookup_tbl_rva) { pitem = m->idata[i].aitems; - hint = (uint32_t *)pitem->hint_name_tbl_rva; + hint = (uint32_t *)pitem->ii_hint_name_tbl_rva; - for (; *hint; hint=(uint32_t *)((++pitem)->hint_name_tbl_rva)) + for (; *hint; hint=(uint32_t *)((++pitem)->ii_hint_name_tbl_rva)) m->idata[i].count++; if (!(m->idata[i].items = calloc(m->idata[i].count,sizeof(*(m->idata[i].items))))) @@ -307,20 +307,20 @@ int pe_get_image_meta( switch (m->opt.oh_std.coh_magic) { case PE_MAGIC_PE32: - m->idata[i].items[j].flags = m->idata[i].items[j].u.import_lookup_entry_32; + m->idata[i].items[j].ii_flags = m->idata[i].items[j].u.ii_import_lookup_entry_32; break; case PE_MAGIC_PE32_PLUS: - m->idata[i].items[j].flags = (m->idata[i].items[j].u.import_lookup_entry_64 >> 32); + m->idata[i].items[j].ii_flags = (m->idata[i].items[j].u.ii_import_lookup_entry_64 >> 32); break; } - if (!m->idata[i].items[j].flags) { + if (!m->idata[i].items[j].ii_flags) { struct pe_raw_hint_name_entry * pentry = (struct pe_raw_hint_name_entry *)(base + m->hidata->sh_ptr_to_raw_data - + m->idata[i].items[j].u.hint_name_tbl_rva - m->hidata->sh_virtual_addr); + + m->idata[i].items[j].u.ii_hint_name_tbl_rva - m->hidata->sh_virtual_addr); - m->idata[i].items[j].name = (char *)pentry->name; + m->idata[i].items[j].ii_name = (char *)pentry->name; } } } diff --git a/src/output/pe_output_import_libraries.c b/src/output/pe_output_import_libraries.c index 54b7b48..cf96005 100644 --- a/src/output/pe_output_import_libraries.c +++ b/src/output/pe_output_import_libraries.c @@ -65,10 +65,10 @@ int pe_output_import_libraries( if (cctx->fmtflags & PERK_OUTPUT_IMPORT_SYMS) for (j=0; j<m->idata[i].count; j++) - if (m->idata[i].items[j].name) + if (m->idata[i].items[j].ii_name) if ((pretty_implib_item( cctx, - m->idata[i].items[j].name, + m->idata[i].items[j].ii_name, fout)) < 0) return PERK_FILE_ERROR(dctx); } diff --git a/src/reader/pe_read_import_header.c b/src/reader/pe_read_import_header.c index 624313b..ef2a4f1 100644 --- a/src/reader/pe_read_import_header.c +++ b/src/reader/pe_read_import_header.c @@ -31,11 +31,11 @@ int pe_read_import_lookup( { switch (magic) { case PE_MAGIC_PE32: - m->u.import_lookup_entry_64 = pe_read_long(p->import_lookup_entry_32); + m->u.ii_import_lookup_entry_64 = pe_read_long(p->ii_import_lookup_entry_32); return 0; case PE_MAGIC_PE32_PLUS: - m->u.import_lookup_entry_64 = pe_read_quad(p->import_lookup_entry_64); + m->u.ii_import_lookup_entry_64 = pe_read_quad(p->ii_import_lookup_entry_64); return 0; default: |