[FFmpeg-devel] [PATCH 3/4] cinepak: check strip_size
Mike Melanson
mike at multimedia.cx
Wed Nov 16 19:14:34 CET 2011
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
> libavcodec/cinepak.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
> index 6a8f462..a5458ca 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;
>
> --
> 1.7.4.1
Yeah, probably a good idea.
--
-Mike Melanson
More information about the ffmpeg-devel
mailing list