summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-12-04 04:24:37 (GMT)
committermidipix <writeonce@midipix.org>2017-12-04 04:24:37 (GMT)
commitbb04de41bfea2070720991407c7aff0a90c95797 (patch)
tree415e403602b79c82b21b864f536690b16e42c6c7
parent1cc0e3e66b2cfb735cf9d0fc237e37ed7540fc39 (diff)
downloadperk-bb04de41bf.tar.bz2
perk-bb04de41bf.tar.xz
pe_get_expsym_by_name(): verify that the image has an .edata section.HEADmain
-rw-r--r--src/logic/pe_get_image_meta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c
index f112f84..64da869 100644
--- a/src/logic/pe_get_image_meta.c
+++ b/src/logic/pe_get_image_meta.c
@@ -115,7 +115,7 @@ int pe_get_expsym_by_name(
const char * sym;
unsigned i;
- if (m->aobj)
+ if (m->aobj || !m->hedata)
return -1;
offset = m->hedata->sh_virtual_addr - m->hedata->sh_ptr_to_raw_data;