lvandeve / lodepng

PNG encoder and decoder in C and C++.
zlib License
2.08k stars 425 forks source link

Continue early to avoid uninitialized value #168

Closed vitalybuka closed 2 years ago

vitalybuka commented 2 years ago

If l == 0 we don't need to load symbol and call reverseBits. However if we do, symbol is uninitialized and function call with uninitialized argument and behavior is undefined.

lvandeve commented 2 years ago

Thanks for finding this!