From 3572e7c6343cb85fc21f5667a7ed0902cf5305cf Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 15 May 2015 22:29:57 +0900 Subject: [PATCH] inflatehd: Fix crash if 'wire' value is not string Fixes GH-235 --- src/inflatehd.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/inflatehd.cc b/src/inflatehd.cc index 37077e85..98338bef 100644 --- a/src/inflatehd.cc +++ b/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) {