[FFmpeg-devel] [PATCH 2/2] avcodec/webp: Fixes null pointer dereference

Ronald S. Bultje rsbultje at gmail.com
Wed May 10 21:11:57 EEST 2017


Hi,

On Wed, May 10, 2017 at 12:37 PM, Michael Niedermayer <
michael at niedermayer.cc> wrote:

> Fixes: 1470/clusterfuzz-testcase-minimized-5404421666111488
> Fixes: 1472/clusterfuzz-testcase-minimized-5677426430443520
>
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
>  libavcodec/webp.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/libavcodec/webp.c b/libavcodec/webp.c
> index e0cd72d03a..1eebb8ccef 100644
> --- a/libavcodec/webp.c
> +++ b/libavcodec/webp.c
> @@ -1351,6 +1351,9 @@ static int vp8_lossy_decode_frame(AVCodecContext
> *avctx, AVFrame *p,
>      if (ret < 0)
>          return ret;
>
> +    if (!*got_frame)
> +        return AVERROR_INVALIDDATA;


This has real meaning - it suggests alt-ref frames don't have alpha planes.
Suggestions:
- please confirm that with @skal;
- return 0, not AVERROR_INVALIDDATA, since alt-ref frames aren't decoding
errors.

Ronald


More information about the ffmpeg-devel mailing list