summaryrefslogtreecommitdiff
path: root/lib9p/core_generated.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib9p/core_generated.c')
-rw-r--r--lib9p/core_generated.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib9p/core_generated.c b/lib9p/core_generated.c
index 6e3633f..ad7b210 100644
--- a/lib9p/core_generated.c
+++ b/lib9p/core_generated.c
@@ -229,12 +229,12 @@ static const lib9p_lock_flags_t lock_flags_masks[LIB9P_VER_NUM] = {
return lib9p_error(ctx, LIB9P_ERRNO_L_EBADMSG, "message is too short for content"); \
if (net_offset > net_size) \
return lib9p_error(ctx, LIB9P_ERRNO_L_EBADMSG, "message is too short for content (", net_offset, " > ", net_size, ")");
-#define VALIDATE_NET_UTF8(n) \
- { \
- size_t len = n; \
- VALIDATE_NET_BYTES(len); \
- if (!utf8_is_valid_without_nul(&net_bytes[net_offset-len], len)) \
- return lib9p_error(ctx, LIB9P_ERRNO_L_EBADMSG, "message contains invalid UTF-8"); \
+#define VALIDATE_NET_UTF8(n) \
+ { \
+ size_t len = n; \
+ VALIDATE_NET_BYTES(len); \
+ if (!utf8_is_valid_without_nul(&net_bytes[net_offset-len], len)) \
+ return lib9p_error(ctx, LIB9P_ERRNO_L_EILSEQ, "message contains invalid UTF-8"); \
}
#define RESERVE_HOST_BYTES(n) \
if (__builtin_add_overflow(host_size, n, &host_size)) \