Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bl_count[0] uninitialized , #34

Closed
young66 opened this issue Mar 22, 2018 · 2 comments
Closed

bl_count[0] uninitialized , #34

young66 opened this issue Mar 22, 2018 · 2 comments

Comments

@rjoursler
Copy link
Contributor

Thank you for submitting this issue, we will go ahead and fix it. This uninitialized value currently does not cause an issue because in this loop
https://github.com/01org/isa-l/blob/9e79faeeff129ce5964fc40174d007c32e49e5b3/igzip/huff_codes.c#L1015-L1016
the important bits for next_code[i] are the first i bits, which are not set by count[0]. All other bits are masked off in a call to the function bit_reverse a short while later.

@young66
Copy link
Author

young66 commented Mar 23, 2018

https://github.com/01org/isa-l/blob/9e79faeeff129ce5964fc40174d007c32e49e5b3/igzip/huff_codes.c#L1015-L1016
in this line, when i =1,the code seen like this
next_code[1] = (next_code[0] + count[0]) << 1;
and the count[0] has read uninitialized

the count is the third argument of function set_huff_codes
https://github.com/01org/isa-l/blob/9e79faeeff129ce5964fc40174d007c32e49e5b3/igzip/huff_codes.c#L1487-L1490

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants