[FFmpeg-cvslog] cinepak: check strip_size

Michael Niedermayer git at videolan.org
Mon Nov 21 22:29:17 CET 2011


ffmpeg | branch: release/0.5 | Michael Niedermayer <michaelni at gmx.at> | Wed Nov 16 17:21:42 2011 +0100| [4f209fe9606a4fb73f2f10d9106a8e990dac3b8d] | committer: Michael Niedermayer

cinepak: check strip_size

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit cea0c82d9b9771dfa2ac729c13c0d9e03ea352a7)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 211a107208ee636da81d2a89592181e2d78a0c8c)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
index c248f00..f6d457d 100644
--- a/libavcodec/cinepak.c
+++ b/libavcodec/cinepak.c
@@ -366,6 +366,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