aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2018-06-24 06:02:02 +0200
committerPřemysl Janouch <p@janouch.name>2018-06-24 06:12:16 +0200
commit711d73f481e7f0254acc3bca3e9dcf9764aaf583 (patch)
tree4ab06f77f77dd4125757d3904c89f2c3981ad184
parentdf340c13ed99bead31c54bbac003b06af82e7dd1 (diff)
downloadjson-rpc-shell-711d73f481e7f0254acc3bca3e9dcf9764aaf583.tar.gz
json-rpc-shell-711d73f481e7f0254acc3bca3e9dcf9764aaf583.tar.xz
json-rpc-shell-711d73f481e7f0254acc3bca3e9dcf9764aaf583.zip
Fix text message UTF-8 validation
-rw-r--r--demo-json-rpc-server.c2
1 files changed, 1 insertions, 1 deletions
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;