diff options
Diffstat (limited to 'lib9p/9p.c')
-rw-r--r-- | lib9p/9p.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -68,7 +68,7 @@ ssize_t lib9p_validate(struct lib9p_ctx *ctx, uint8_t *net_bytes) { return -1; assert(subctx.net_offset <= subctx.net_size); if (subctx.net_offset < subctx.net_size) - return lib9p_error(ctx, LINUX_EBADMSG, "message has %"PRIu32" extra bytes", + return lib9p_errorf(ctx, LINUX_EBADMSG, "message has %"PRIu32" extra bytes", subctx.net_size - subctx.net_offset); ssize_t ret; @@ -92,7 +92,7 @@ void lib9p_unmarshal(struct lib9p_ctx *ctx, uint8_t *net_bytes, /* Body */ struct _vtable_msg vtable = _lib9p_vtables[ctx->version].msgs[*ret_typ]; - subctx.extra = ret_body + vtable.unmarshal_basesize; + subctx.extra = ret_body + vtable.basesize; vtable.unmarshal(&subctx, ret_body); } |