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
This commit is contained in:
Luca Barbato 2015-05-25 21:53:26 +02:00
parent b2f0f37d24
commit 5ecabd3c54
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic,
unsigned int pixel_ptr = 0; unsigned int pixel_ptr = 0;
int row_dec = pic->linesize[0]; int row_dec = pic->linesize[0];
int row_ptr = (avctx->height - 1) * row_dec; 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; int i;
while (row_ptr >= 0) { while (row_ptr >= 0) {