diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-02 13:55:08 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-02 13:55:08 -0600 |
commit | b7a140a42f272aadb5400f013cd21a7a218d26e8 (patch) | |
tree | 6770864edd0330704b43d4b2c8f9d8240f691678 /lib9p/9p.c | |
parent | fa7f6a5176a386f8847810f34538d5c0e56f0fb1 (diff) |
wip validate, bitfield
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); } |