summaryrefslogtreecommitdiffhomepage
path: root/src/driver/pe_unit_ctx.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-12-06 08:28:32 -0500
committermidipix <writeonce@midipix.org>2016-11-10 23:35:31 -0500
commit76aabf2c240c67ede7734f544be94f64da2c55c5 (patch)
tree460af7b94992a3635b380e5cef0a5663c61a69a3 /src/driver/pe_unit_ctx.c
parentd7ed3e2faf8e3bc1aeb1e7fed27cd8a1ff4b2290 (diff)
downloadperk-76aabf2c240c67ede7734f544be94f64da2c55c5.tar.bz2
perk-76aabf2c240c67ede7734f544be94f64da2c55c5.tar.xz
API redesign 6/10: pe_common_ctx: protect i/o members against direct modification.
Diffstat (limited to 'src/driver/pe_unit_ctx.c')
-rw-r--r--src/driver/pe_unit_ctx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/driver/pe_unit_ctx.c b/src/driver/pe_unit_ctx.c
index df5409b..40e88ab 100644
--- a/src/driver/pe_unit_ctx.c
+++ b/src/driver/pe_unit_ctx.c
@@ -33,7 +33,7 @@ int pe_get_unit_ctx(
? PROT_READ | PROT_WRITE
: PROT_READ;
- if (pe_map_raw_image(dctx->cctx->fdin,path,prot,&ctx->map))
+ if (pe_map_raw_image(dctx->cctx->ioctx->fdin,path,prot,&ctx->map))
return pe_free_unit_ctx_impl(ctx,-1);
if (pe_get_image_meta(&ctx->map,&ctx->meta))
@@ -43,7 +43,7 @@ int pe_get_unit_ctx(
sizeof(ctx->cctx));
ctx->path = ctx->path;
- ctx->cctx.prot = prot;
+ ctx->ioctx.prot = prot;
ctx->uctx.path = &ctx->path;
ctx->uctx.map = &ctx->map;