igzip: Fix bug read_header causing false error return values
Change-Id: I7b2fc0d7fa1ea78fab6c8788618d3e48ece56cfd Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
This commit is contained in:
parent
0bac63c2e6
commit
c17f2959d4
@ -634,12 +634,13 @@ static int inline setup_dynamic_header(struct inflate_state *state)
|
|||||||
if (code_count[i] != 0)
|
if (code_count[i] != 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (i == 16)
|
|
||||||
return ISAL_INVALID_BLOCK;
|
|
||||||
|
|
||||||
if (state->read_in_length < 0)
|
if (state->read_in_length < 0)
|
||||||
return ISAL_END_INPUT;
|
return ISAL_END_INPUT;
|
||||||
|
|
||||||
|
if (i == 16)
|
||||||
|
return ISAL_INVALID_BLOCK;
|
||||||
|
|
||||||
make_inflate_huff_code_small(&inflate_code_huff, code_huff, CODE_LEN_CODES,
|
make_inflate_huff_code_small(&inflate_code_huff, code_huff, CODE_LEN_CODES,
|
||||||
code_count, CODE_LEN_CODES);
|
code_count, CODE_LEN_CODES);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user