aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-16 17:21:42 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-16 20:47:05 +0100
commitcea0c82d9b9771dfa2ac729c13c0d9e03ea352a7 (patch)
tree25ab6406748f0d1c3c11f2a44d71195750c7e5a7
parentf35f50b311a7224602ee2112238188185087465a (diff)
downloadffmpeg-cea0c82d9b9771dfa2ac729c13c0d9e03ea352a7.tar.gz
cinepak: check strip_size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/cinepak.c2
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;