diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-16 17:21:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-18 21:05:12 +0100 |
commit | 211a107208ee636da81d2a89592181e2d78a0c8c (patch) | |
tree | c186191055f71950caa58d00da1b3e02ea67baa6 | |
parent | fdd09e5d7b2b0fff9458e287c41aea2e89359b23 (diff) | |
download | ffmpeg-211a107208ee636da81d2a89592181e2d78a0c8c.tar.gz |
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>
-rw-r--r-- | libavcodec/cinepak.c | 2 |
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; |