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/logic | |
parent | 01f3704beb76ac3d8597b7dac2f01d53a5e6e538 (diff) | |
download | perk-a402c4942040e060c9572efd17759d275826771b.tar.bz2 perk-a402c4942040e060c9572efd17759d275826771b.tar.xz |
struct pe_block: member name normalization.
Diffstat (limited to 'src/logic')
-rw-r--r-- | src/logic/pe_get_image_meta.c | 6 |
1 files changed, 3 insertions, 3 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); |