[SCM] libav/experimental: Return on negative soff sizes, fixes issue 2515.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:21:40 UTC 2013


The following commit has been merged in the experimental branch:
commit a4db272a92a5556ff45ecd15735fe578ec6e81c5
Author: Daniel Kang <daniel.d.kang at gmail.com>
Date:   Sun Jan 9 19:29:39 2011 +0000

    Return on negative soff sizes, fixes issue 2515.
    
    Patch by Daniel Kang, daniel.d.kang at gmail
    
    Originally committed as revision 26288 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index c1b71dc..f5d922a 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -540,6 +540,10 @@ static int decode_frame(AVCodecContext *avctx,
             soff = tget(&s->stripdata, s->sot, s->le);
         }else
             soff = s->stripoff;
+        if (soff < 0) {
+            av_log(avctx, AV_LOG_ERROR, "Invalid stripoff: %d\n", soff);
+            return AVERROR(EINVAL);
+        }
         if(tiff_unpack_strip(s, dst, stride, orig_buf + soff, ssize, FFMIN(s->rps, s->height - i)) < 0)
             break;
         dst += s->rps * stride;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list