aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2015-05-25 21:53:26 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-05-30 16:30:22 +0200
commit70642090960c35dcd6da941c869bdf55d4f3bb00 (patch)
treef02248e15a521b6e88b7fa36ba7bd601b90a2de7 /libavcodec
parent4dc0fbb13c33b4e5bdb766652f4daf900ccc952f (diff)
downloadffmpeg-70642090960c35dcd6da941c869bdf55d4f3bb00.tar.gz
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@libav.org
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/msrledec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/msrledec.c b/libavcodec/msrledec.c
index af2a2478b1..370d9bdfce 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) {