h2spec reported that we didn't check that no more than 7 bits of padding
were left after decoding an huffman-encoded literal. This is harmless but
better fix it now.
To backport to 1.8.
if (bleft > 0) {
/* some bits were not consumed after the last code, they must
- * match EOS (ie: all ones).
+ * match EOS (ie: all ones) and there must be 7 bits or less.
+ * (7541#5.2).
*/
+ if (bleft > 7)
+ return -1;
+
if ((code & -(1 << (32 - bleft))) != (uint32_t)-(1 << (32 - bleft)))
return -1;
}