summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-10-24 23:11:39 -0400
committermidipix <writeonce@midipix.org>2016-11-10 23:35:54 -0500
commitacad6b4b0458a0b2e456bd96baf588566cc8e3ab (patch)
tree6866166a5233e0d0f7621280017514b7d68c7c09 /src
parentcee41b5403811e6eb59dea5b85a75588873bebc5 (diff)
downloadperk-acad6b4b0458a0b2e456bd96baf588566cc8e3ab.tar.bz2
perk-acad6b4b0458a0b2e456bd96baf588566cc8e3ab.tar.xz
pe_map_raw_image(): improved error trace report.
Diffstat (limited to 'src')
-rw-r--r--src/logic/pe_map_raw_image.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/logic/pe_map_raw_image.c b/src/logic/pe_map_raw_image.c
index f7f0df3..36978c7 100644
--- a/src/logic/pe_map_raw_image.c
+++ b/src/logic/pe_map_raw_image.c
@@ -42,7 +42,8 @@ int pe_map_raw_image(
return PERK_SYSTEM_ERROR(dctx);
else if (st.st_size == 0)
- return PERK_CUSTOM_ERROR(dctx,0);
+ return PERK_CUSTOM_ERROR(
+ dctx,PERK_ERR_IMAGE_SIZE_ZERO);
map->size = st.st_size;
map->addr = mmap(0,map->size,prot,MAP_PRIVATE,fd,0);