Commit beefafda authored by Laurent Aimar's avatar Laurent Aimar Committed by Martin Storsjö

Fixed invalid access in wavpack decoder on corrupted extra bits sub-blocks.

Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 5ea091fb
......@@ -385,7 +385,7 @@ static inline int wv_get_value_integer(WavpackFrameContext *s, uint32_t *crc, in
if(s->extra_bits){
S <<= s->extra_bits;
if(s->got_extra_bits){
if(s->got_extra_bits && get_bits_left(&s->gb_extra_bits) >= s->extra_bits){
S |= get_bits(&s->gb_extra_bits, s->extra_bits);
*crc = *crc * 9 + (S&0xffff) * 3 + ((unsigned)S>>16);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment