Assert ctx->state >= 0 in huffman decoding
This commit is contained in:
parent
86ab9f33de
commit
5e6a2fa256
|
@ -177,7 +177,11 @@ ssize_t nghttp2_hd_huff_decode(nghttp2_hd_huff_decode_context *ctx,
|
|||
for(i = 0; i < srclen; ++i) {
|
||||
uint8_t in = src[i] >> 4;
|
||||
for(j = 0; j < 2; ++j) {
|
||||
const nghttp2_huff_decode *t = &huff_decode_table[ctx->state][in];
|
||||
const nghttp2_huff_decode *t;
|
||||
|
||||
assert(ctx->state >= 0);
|
||||
|
||||
t = &huff_decode_table[ctx->state][in];
|
||||
if(t->state == -1) {
|
||||
return NGHTTP2_ERR_HEADER_COMP;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue