igzip: Fix uninitialized used of bl_count[0]

Fixes #34

Change-Id: I489b1ae24212d81875b96f687f3543ac548e2278
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
This commit is contained in:
Roy Oursler 2018-03-22 12:56:18 -07:00
parent bcde6e410b
commit 4734834501

View File

@ -970,6 +970,7 @@ static inline uint32_t fix_code_lens(struct heap_tree *heap_space, uint32_t root
code_len--;
}
bl_count[0] = 0;
for (i = 1; i <= code_len; i++)
bl_count[i] = code_len_count[i];
for (; i <= max_code_len; i++)
@ -982,6 +983,7 @@ static inline uint32_t fix_code_lens(struct heap_tree *heap_space, uint32_t root
for (; code_len_count[k] == 0; k++) ;
}
} else {
bl_count[0] = 0;
for (i = 1; i <= code_len; i++)
bl_count[i] = code_len_count[i];
for (; i <= max_code_len; i++)