[SCM] libav/experimental: Fix off-by-one error in MS RLE decoder which may result into writing past picture buffer.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:45:58 UTC 2013


The following commit has been merged in the experimental branch:
commit b3867c93d10b42dae1aeb1e8fa6059c5b87c28a5
Author: Kostya Shishkov <kostya.shishkov at gmail.com>
Date:   Sat May 16 06:39:08 2009 +0000

    Fix off-by-one error in MS RLE decoder which may result into writing past
    picture buffer.
    
    Originally committed as revision 18852 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/msrledec.c b/libavcodec/msrledec.c
index 40fec31..1401ee3 100644
--- a/libavcodec/msrledec.c
+++ b/libavcodec/msrledec.c
@@ -134,7 +134,7 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int de
 {
     uint8_t *output, *output_end;
     const uint8_t* src = data;
-    int p1, p2, line=avctx->height, pos=0, i;
+    int p1, p2, line=avctx->height - 1, pos=0, i;
     uint16_t av_uninit(pix16);
     uint32_t av_uninit(pix32);
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list