diff options
author | midipix <writeonce@midipix.org> | 2016-11-30 20:45:15 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-30 20:45:15 -0500 |
commit | a402c4942040e060c9572efd17759d275826771b (patch) | |
tree | 7106dff0822060676f9b856ad507b6f6ce6694ee /src | |
parent | 01f3704beb76ac3d8597b7dac2f01d53a5e6e538 (diff) | |
download | perk-a402c4942040e060c9572efd17759d275826771b.tar.bz2 perk-a402c4942040e060c9572efd17759d275826771b.tar.xz |
struct pe_block: member name normalization.
Diffstat (limited to 'src')
-rw-r--r-- | src/logic/pe_get_image_meta.c | 6 | ||||
-rw-r--r-- | src/reader/pe_read_optional_header.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c index 8d0747e..f3c0dac 100644 --- a/src/logic/pe_get_image_meta.c +++ b/src/logic/pe_get_image_meta.c @@ -52,7 +52,7 @@ int pe_get_block_section_index(const struct pe_image_meta * m, const struct pe_b low = m->sectbl[i].virtual_addr; high = low + m->sectbl[i].virtual_size; - if ((block->rva >= low) && (block->rva + block->size <= high)) + if ((block->dh_rva >= low) && (block->dh_rva + block->dh_size <= high)) return i; } @@ -230,7 +230,7 @@ int pe_get_image_meta( if (s >= 0) { m->hedata = &m->sectbl[s]; m->aedata = (struct pe_raw_export_hdr *)(base + m->sectbl[s].ptr_to_raw_data - + m->opt.dirs.export_tbl.rva - m->sectbl[s].virtual_addr); + + m->opt.dirs.export_tbl.dh_rva - m->sectbl[s].virtual_addr); } else if (i >= 0) { m->hedata = &m->sectbl[i]; m->aedata = (struct pe_raw_export_hdr *)(base + m->sectbl[i].ptr_to_raw_data); @@ -255,7 +255,7 @@ int pe_get_image_meta( if (s >= 0) { m->hidata = &m->sectbl[s]; m->aidata = (struct pe_raw_import_hdr *)(base + m->sectbl[s].ptr_to_raw_data - + m->opt.dirs.import_tbl.rva - m->sectbl[s].virtual_addr); + + m->opt.dirs.import_tbl.dh_rva - m->sectbl[s].virtual_addr); } else if (i >= 0) { m->hidata = &m->sectbl[i]; m->aidata = (struct pe_raw_import_hdr *)(base + m->sectbl[i].ptr_to_raw_data); diff --git a/src/reader/pe_read_optional_header.c b/src/reader/pe_read_optional_header.c index 22d9321..1b32d95 100644 --- a/src/reader/pe_read_optional_header.c +++ b/src/reader/pe_read_optional_header.c @@ -92,8 +92,8 @@ static int pe_read_optional_header_structs(const union pe_raw_opt_hdr * p, struc pdir = &m->dirs.export_tbl; for (i=0; i<m->ldr.coh_rva_and_sizes; i++) { - pdir[i].rva = pe_read_long(&mark[i*8]); - pdir[i].size = pe_read_long(&mark[i*8+4]); + pdir[i].dh_rva = pe_read_long(&mark[i*8]); + pdir[i].dh_size = pe_read_long(&mark[i*8+4]); } return 0; |