mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/flacdec: fix off by 1 error
Fixes assertion failure Fixes: signal_sigsegv_324b284_1980_dilvie___the_dragonfly.flac Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e5c01ccdf5
commit
5f30522894
|
@ -366,7 +366,7 @@ static inline int decode_subframe(FLACContext *s, int channel)
|
|||
|
||||
if (get_bits1(&s->gb)) {
|
||||
int left = get_bits_left(&s->gb);
|
||||
if ( left < 0 ||
|
||||
if ( left <= 0 ||
|
||||
(left < bps && !show_bits_long(&s->gb, left)) ||
|
||||
!show_bits_long(&s->gb, bps)) {
|
||||
av_log(s->avctx, AV_LOG_ERROR,
|
||||
|
|
Loading…
Reference in New Issue