diff --git a/lib/nghttp2_hd.c b/lib/nghttp2_hd.c index ffe3895e..e82874e0 100644 --- a/lib/nghttp2_hd.c +++ b/lib/nghttp2_hd.c @@ -306,6 +306,9 @@ static int emit_indexed_header(nghttp2_hd_context *context, nghttp2_hd_entry *ent) { int rv; + /* ent->ref may be 0. This happens if the careless stupid encoder + emits literal block larger than header table capacity with + indexing. */ rv = add_emit_set(context, ent); if(rv != 0) { return rv;