diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-09-11 19:17:43 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-21 18:02:40 +0200 |
commit | c9316b7c6d30e87f469ca6d9651f26eff5f4c6e9 (patch) | |
tree | 01cb628c661abccfab20f1d12bbb449a2cb104ae | |
parent | 8511c141e02d5a8c63d9cf1e8aef1d1135a7f7fa (diff) | |
download | ffmpeg-c9316b7c6d30e87f469ca6d9651f26eff5f4c6e9.tar.gz |
Fixed invalid read access on extra data in cinepak decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dc255275f6293a060518271a151e1ce75499e874)
-rw-r--r-- | libavcodec/cinepak.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c index 57657afaa4..0b822d2b7a 100644 --- a/libavcodec/cinepak.c +++ b/libavcodec/cinepak.c @@ -336,7 +336,8 @@ static int cinepak_decode (CinepakContext *s) * If the frame header is followed by the bytes FE 00 00 06 00 00 then * this is probably one of the two known files that have 6 extra bytes * after the frame header. Else, assume 2 extra bytes. */ - if ((s->data[10] == 0xFE) && + if (s->size >= 16 && + (s->data[10] == 0xFE) && (s->data[11] == 0x00) && (s->data[12] == 0x00) && (s->data[13] == 0x06) && |