From 711d73f481e7f0254acc3bca3e9dcf9764aaf583 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch
Date: Sun, 24 Jun 2018 06:02:02 +0200 Subject: Fix text message UTF-8 validation --- demo-json-rpc-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo-json-rpc-server.c b/demo-json-rpc-server.c index cf4d374..6ae1742 100644 --- a/demo-json-rpc-server.c +++ b/demo-json-rpc-server.c @@ -711,7 +711,7 @@ ws_handler_on_frame (void *user_data, const struct ws_parser *parser) return true; if (self->message_opcode == WS_OPCODE_TEXT - && !utf8_validate (self->parser.input.str, self->parser.input.len)) + && !utf8_validate (self->message_data.str, self->message_data.len)) { ws_handler_fail (self, WS_STATUS_INVALID_PAYLOAD_DATA); return false; -- cgit v1.2.3-70-g09d2