[FFmpeg-cvslog] cinepak: check strip_size

Michael Niedermayer git at videolan.org
Sat Nov 19 02:09:43 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Nov 16 17:21:42 2011 +0100| [867b496681b3cdc774b80764fbea42f7c9aca842] | committer: Martin Storsjö

cinepak: check strip_size

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
Signed-off-by: Martin Storsjö <martin at martin.st>

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

 libavcodec/cinepak.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
index e66a1c0..a858d6e 100644
--- a/libavcodec/cinepak.c
+++ b/libavcodec/cinepak.c
@@ -370,6 +370,8 @@ static int cinepak_decode (CinepakContext *s)
         s->strips[i].x2 = s->avctx->width;
 
         strip_size = AV_RB24 (&s->data[1]) - 12;
+        if (strip_size < 0)
+            return -1;
         s->data   += 12;
         strip_size = ((s->data + strip_size) > eod) ? (eod - s->data) : strip_size;
 



More information about the ffmpeg-cvslog mailing list