Commit 867b4966 authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Martin Storsjö

cinepak: check strip_size

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent d92fea2b
...@@ -370,6 +370,8 @@ static int cinepak_decode (CinepakContext *s) ...@@ -370,6 +370,8 @@ static int cinepak_decode (CinepakContext *s)
s->strips[i].x2 = s->avctx->width; s->strips[i].x2 = s->avctx->width;
strip_size = AV_RB24 (&s->data[1]) - 12; strip_size = AV_RB24 (&s->data[1]) - 12;
if (strip_size < 0)
return -1;
s->data += 12; s->data += 12;
strip_size = ((s->data + strip_size) > eod) ? (eod - s->data) : strip_size; strip_size = ((s->data + strip_size) > eod) ? (eod - s->data) : strip_size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment