From c3af45f9ccbf4475d77f82512f308b64084f88ae Mon Sep 17 00:00:00 2001 From: midipix Date: Tue, 15 Nov 2016 21:46:38 -0500 Subject: pe_output_export_symbols(): code maintenance. --- src/output/pe_output_export_symbols.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/output/pe_output_export_symbols.c b/src/output/pe_output_export_symbols.c index ee48b0e..2319a17 100644 --- a/src/output/pe_output_export_symbols.c +++ b/src/output/pe_output_export_symbols.c @@ -36,6 +36,7 @@ int pe_output_export_symbols( const struct pe_image_meta * m, FILE * fout) { + char * mark; uint32_t offset; uint32_t * symrva; unsigned i; @@ -50,13 +51,14 @@ int pe_output_export_symbols( if ((pretty_header(cctx,fout)) < 0) return PERK_FILE_ERROR(dctx); + mark = m->image.addr; offset = m->hedata->virtual_addr - m->hedata->ptr_to_raw_data; - symrva = (uint32_t *)((uintptr_t)m->image.addr + (m->edata.name_ptr_rva - offset)); + symrva = (uint32_t *)(mark + m->edata.name_ptr_rva - offset); for (i=0; iedata.num_of_name_ptrs; i++) if ((pretty_export_item( cctx, - (char *)((uintptr_t)m->image.addr + symrva[i] - offset), + &mark[symrva[i] - offset], fout)) < 0) return PERK_FILE_ERROR(dctx); -- cgit v1.2.3