mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-31 11:53:24 +00:00
Fixed invalid access in wavpack decoder on corrupted extra bits sub-blocks.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit beefafda63
)
This commit is contained in:
parent
e6df35b3be
commit
90edd5df3d
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user