[FFmpeg-cvslog] avcodec/on2avc: Fix out of array access

Michael Niedermayer git at videolan.org
Wed Jul 2 21:05:05 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jul  2 20:22:12 2014 +0200| [ce6a1ff2a124b3b0e8530bca1b6eed5a368feb5a] | committer: Michael Niedermayer

avcodec/on2avc: Fix out of array access

Fixes CID1206648

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ce6a1ff2a124b3b0e8530bca1b6eed5a368feb5a
---

 libavcodec/on2avc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/on2avc.c b/libavcodec/on2avc.c
index 4f30606..ab6048b 100644
--- a/libavcodec/on2avc.c
+++ b/libavcodec/on2avc.c
@@ -172,7 +172,7 @@ static int on2avc_decode_band_scales(On2AVCContext *c, GetBitContext *gb)
             } else {
                 scale += get_vlc2(gb, c->scale_diff.table, 9, 3) - 60;
             }
-            if (scale < 0 || scale > 128) {
+            if (scale < 0 || scale > 127) {
                 av_log(c->avctx, AV_LOG_ERROR, "Invalid scale value %d\n",
                        scale);
                 return AVERROR_INVALIDDATA;



More information about the ffmpeg-cvslog mailing list