diff options
Diffstat (limited to 'lib9p/9p.generated.c')
-rw-r--r-- | lib9p/9p.generated.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib9p/9p.generated.c b/lib9p/9p.generated.c index 1fef571..b2243e2 100644 --- a/lib9p/9p.generated.c +++ b/lib9p/9p.generated.c @@ -400,7 +400,7 @@ static ALWAYS_INLINE bool validate_stat(struct _validate_ctx *ctx) { || ( (ctx->ctx->version==LIB9P_VER_9P2000_u) && validate_4(ctx) ) || ( (ctx->ctx->version==LIB9P_VER_9P2000_u) && validate_4(ctx) ) || ( (ctx->ctx->version==LIB9P_VER_9P2000_u) && validate_4(ctx) ) - || ((uint32_t)decode_u16le(&ctx->net_bytes[size_offset]) != ctx->net_offset - size_offset + || ((uint32_t)decode_u16le(&ctx->net_bytes[size_offset]) != ctx->net_offset - (size_offset+2) ? lib9p_error(ctx->ctx, LINUX_EBADMSG, "stat size does not match stat contents") : false); } @@ -965,9 +965,9 @@ static ALWAYS_INLINE bool marshal_stat(struct _marshal_ctx *ctx, struct lib9p_st || ( (ctx->ctx->version==LIB9P_VER_9P2000_u) && marshal_4(ctx, &val->file_owner_n_uid) ) || ( (ctx->ctx->version==LIB9P_VER_9P2000_u) && marshal_4(ctx, &val->file_owner_n_gid) ) || ( (ctx->ctx->version==LIB9P_VER_9P2000_u) && marshal_4(ctx, &val->file_last_modified_n_uid) ) - || ((ctx->net_offset - size_offset > UINT16_MAX) + || ((ctx->net_offset - (size_offset+2) > UINT16_MAX) ? lib9p_error(ctx->ctx, LINUX_ERANGE, "stat object too large") - : ({ encode_u16le((uint16_t)(ctx->net_offset - size_offset), &ctx->net_bytes[size_offset]); + : ({ encode_u16le((uint16_t)(ctx->net_offset - (size_offset+2)), &ctx->net_bytes[size_offset]); false; })); } |