aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-26 04:07:34 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-26 04:11:16 +0100
commit5f30522894d19a14324b80bc282c094dabdb31c0 (patch)
tree400e5930aa93087597218507884048389e8d85f3
parente5c01ccdf5a9a330d4c51a9b9ea721fd8f1fb70b (diff)
downloadffmpeg-5f30522894d19a14324b80bc282c094dabdb31c0.tar.gz
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>
-rw-r--r--libavcodec/flacdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index cda44ba43f..34a0a70ada 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -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,