Skip to content
Permalink
Browse files

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

Fixes GH-235
  • Loading branch information...
tatsuhiro-t committed May 15, 2015
1 parent 0479f83 commit 3572e7c6343cb85fc21f5667a7ed0902cf5305cf
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/inflatehd.cc
@@ -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) {

0 comments on commit 3572e7c

Please sign in to comment.
You can’t perform that action at this time.