diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-16 17:21:42 +0100 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2011-11-18 11:58:43 +0200 |
commit | 867b496681b3cdc774b80764fbea42f7c9aca842 (patch) | |
tree | 1a614cd7b5e8ba38f7e0bbee72ced25dafc9ed30 /libavcodec/cinepak.c | |
parent | d92fea2b1420aea1c1f3c2ececbd953f5f06f49b (diff) | |
download | ffmpeg-867b496681b3cdc774b80764fbea42f7c9aca842.tar.gz |
cinepak: check strip_size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Martin Storsjö <martin@martin.st>
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 e66a1c05a2..a858d6e866 100644 --- a/libavcodec/cinepak.c +++ b/libavcodec/cinepak.c @@ -370,6 +370,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; |