Commit 3572e7c6 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

inflatehd: Fix crash if 'wire' value is not string

Fixes GH-235
parent 0479f833
...@@ -101,6 +101,11 @@ static int inflate_hd(json_t *obj, nghttp2_hd_inflater *inflater, int seq) { ...@@ -101,6 +101,11 @@ static int inflate_hd(json_t *obj, nghttp2_hd_inflater *inflater, int seq) {
return -1; return -1;
} }
if (!json_is_string(wire)) {
fprintf(stderr, "'wire' value is not string at %d\n", seq);
return -1;
}
auto table_size = json_object_get(obj, "header_table_size"); auto table_size = json_object_get(obj, "header_table_size");
if (table_size) { if (table_size) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment