summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-02-06 19:04:58 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2017-02-06 19:04:58 +0100
commit5946081a91163fff659eb3f2646da89d2bf71870 (patch)
tree3bc08a456030258e115e097a0b9867ba427f8dac
parent753d5f02ae11e1983cf248d7097a2da41caa880f (diff)
downloadjson-rpc-shell-5946081a91163fff659eb3f2646da89d2bf71870.tar.gz
json-rpc-shell-5946081a91163fff659eb3f2646da89d2bf71870.tar.xz
json-rpc-shell-5946081a91163fff659eb3f2646da89d2bf71870.zip
WebSocket: fix segfault in HTTP parsing
-rw-r--r--json-rpc-shell.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/json-rpc-shell.c b/json-rpc-shell.c
index 8f19b1e..09c4d82 100644
--- a/json-rpc-shell.c
+++ b/json-rpc-shell.c
@@ -2085,6 +2085,7 @@ backend_ws_connect (struct ws_context *self, struct error **e)
}
http_parser_init (&self->hp, HTTP_RESPONSE);
+ self->hp.data = self;
str_reset (&self->field);
str_reset (&self->value);
str_map_clear (&self->headers);