diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-16 17:21:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-16 20:47:05 +0100 |
commit | cea0c82d9b9771dfa2ac729c13c0d9e03ea352a7 (patch) | |
tree | 25ab6406748f0d1c3c11f2a44d71195750c7e5a7 /libavcodec/cinepak.c | |
parent | f35f50b311a7224602ee2112238188185087465a (diff) | |
download | ffmpeg-cea0c82d9b9771dfa2ac729c13c0d9e03ea352a7.tar.gz |
cinepak: check strip_size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cinepak.c')
-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 6a8f46202f..a5458cac8e 100644 --- a/libavcodec/cinepak.c +++ b/libavcodec/cinepak.c @@ -375,6 +375,8 @@ static int cinepak_decode (CinepakContext *s) s->frame.key_frame = 1; 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; |