Aneesh Dogra <[email protected]> writes:

> ---
>  libavcodec/vc1dec.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
> index 0340dc2..21285c0 100644
> --- a/libavcodec/vc1dec.c
> +++ b/libavcodec/vc1dec.c
> @@ -5522,8 +5522,11 @@ static int vc1_decode_frame(AVCodecContext *avctx, 
> void *data,
>              }
>          } else if (v->interlace && ((buf[0] & 0xC0) == 0xC0)) { /* WVC1 
> interlaced stores both fields divided by marker */
>              const uint8_t *divider;
> -
> +            n_slices1 = n_slices;
> +            slices = av_realloc(slices, sizeof(*slices) * (n_slices+1));

This leaks memory if the allocation fails.  It is also missing a check
for such failure.  Patch is thus not OK, despite what others might have
said.

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to