Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-16 20:21:42 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-11-19 00:05:12 +0400
commit211a107208ee636da81d2a89592181e2d78a0c8c (patch)
treec186191055f71950caa58d00da1b3e02ea67baa6 /libavcodec
parentfdd09e5d7b2b0fff9458e287c41aea2e89359b23 (diff)
cinepak: check strip_size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit cea0c82d9b9771dfa2ac729c13c0d9e03ea352a7) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/cinepak.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
index 0b822d2b7a..6d1061b558 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;