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:
Roy Oursler 2016-08-24 11:00:08 -07:00 committed by Greg Tucker
parent 0bac63c2e6
commit c17f2959d4

View File

@ -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);