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

Fixes GH-235
This commit is contained in:
Tatsuhiro Tsujikawa 2015-05-15 22:29:57 +09:00
parent 0479f833fc
commit 3572e7c634
1 changed files with 5 additions and 0 deletions

View File

@ -101,6 +101,11 @@ static int inflate_hd(json_t *obj, nghttp2_hd_inflater *inflater, int seq) {
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");
if (table_size) {