igzip: Fix make_huff_code_lookup_table initialization bug.

Change-Id: I192ce6c907271d52bfda5bf4be6d5b2a35a9d459
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
This commit is contained in:
Roy Oursler 2016-11-16 15:06:01 -07:00 committed by Greg Tucker
parent f0a39fea2a
commit 89fedafcc9

View File

@ -193,7 +193,7 @@ static void inline make_inflate_huff_code_large(struct inflate_huff_code_large *
copy_size = (1 << last_length); copy_size = (1 << last_length);
/* Initialize short_code_lookup, so invalid lookups process data */ /* Initialize short_code_lookup, so invalid lookups process data */
memset(short_code_lookup, 0x1d, copy_size * sizeof(*short_code_lookup)); memset(short_code_lookup, 0x00, copy_size * sizeof(*short_code_lookup));
for (k = 0; k < code_list_len; k++) { for (k = 0; k < code_list_len; k++) {
i = code_list[k]; i = code_list[k];
@ -350,7 +350,7 @@ static void inline make_inflate_huff_code_small(struct inflate_huff_code_small *
copy_size = (1 << last_length); copy_size = (1 << last_length);
/* Initialize short_code_lookup, so invalid lookups process data */ /* Initialize short_code_lookup, so invalid lookups process data */
memset(short_code_lookup, 0x1d, copy_size * sizeof(*short_code_lookup)); memset(short_code_lookup, 0x00, copy_size * sizeof(*short_code_lookup));
for (k = 0; k < code_list_len; k++) { for (k = 0; k < code_list_len; k++) {
i = code_list[k]; i = code_list[k];