Fixes: null pointer dereference Reported-by: TOTE Robot <os...@tsinghua.edu.cn> Signed-off-by: Steven Liu <l...@chinaffmpeg.org> --- libavcodec/vp6.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c index d024370793..7ddabbff80 100644 --- a/libavcodec/vp6.c +++ b/libavcodec/vp6.c @@ -653,6 +653,8 @@ static av_cold int vp6_decode_init(AVCodecContext *avctx) if (s->has_alpha) { s->alpha_context = av_mallocz(sizeof(VP56Context)); + if (!s->alpha_context) + return AVERROR(ENOMEM); ff_vp56_init_context(avctx, s->alpha_context, s->flip == -1, s->has_alpha); ff_vp6dsp_init(&s->alpha_context->vp56dsp); -- 2.25.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".