aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2018-05-11 22:34:19 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2018-05-11 22:34:19 +0200
commit19e10aaf3e1683548e0dd5da81ba1d5c20714a0c (patch)
tree8392e7fa957afb0b8d0891cc83c9d179edbb4557
parent2e1127e3711b53f8fa0d3ed6619bed88cbf80ce4 (diff)
downloadjson-rpc-shell-19e10aaf3e1683548e0dd5da81ba1d5c20714a0c.tar.gz
json-rpc-shell-19e10aaf3e1683548e0dd5da81ba1d5c20714a0c.tar.xz
json-rpc-shell-19e10aaf3e1683548e0dd5da81ba1d5c20714a0c.zip
Fix UTF-8 validation
-rw-r--r--json-rpc-shell.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/json-rpc-shell.c b/json-rpc-shell.c
index 7d104a2..77a9fa9 100644
--- a/json-rpc-shell.c
+++ b/json-rpc-shell.c
@@ -1958,7 +1958,7 @@ backend_ws_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))
return backend_ws_fail (self, WS_STATUS_INVALID_PAYLOAD_DATA);
bool result = backend_ws_on_message (self, self->message_opcode,