[FFmpeg-cvslog] msrle: Use FFABS to determine the frame size in msrle_decode_pal4

Luca Barbato git at videolan.org
Mon Jun 1 13:42:26 CEST 2015


ffmpeg | branch: release/2.2 | Luca Barbato <lu_zero at gentoo.org> | Mon May 25 21:53:26 2015 +0200| [48c7fe5b5834a197f10a6eb56cbe7cda8ee32407] | committer: Reinhard Tartler

msrle: Use FFABS to determine the frame size in msrle_decode_pal4

As done in msrle_decode_8_16_24_32.

Bug-Id: CVE-2015-3395
CC: libav-stable at libav.org

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

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

diff --git a/libavcodec/msrledec.c b/libavcodec/msrledec.c
index af2a247..370d9bd 100644
--- a/libavcodec/msrledec.c
+++ b/libavcodec/msrledec.c
@@ -39,7 +39,7 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic,
     unsigned int pixel_ptr = 0;
     int row_dec = pic->linesize[0];
     int row_ptr = (avctx->height - 1) * row_dec;
-    int frame_size = row_dec * avctx->height;
+    int frame_size = FFABS(row_dec) * avctx->height;
     int i;
 
     while (row_ptr >= 0) {



More information about the ffmpeg-cvslog mailing list