mirror of
https://github.com/webmproject/libwebp.git
synced 2025-04-05 00:16:50 +02:00
Earlier we were only testing for bit_pos == LBITS. But this is not sufficient, as bit_pos can jump from < LBITS to > LBITS. This was resulting in some bit-stream truncation errors not being caught. Note: Not a security bug though, as br->pos wasn't incremented in such cases and so we weren't reading beyond the buffer. Change-Id: Idadcdcbc6a5713f8fac3470f907fa37a63074836