From bc8842c01997a3ee65b36d246aa288a891b05708 Mon Sep 17 00:00:00 2001 From: wanghao-free Date: Mon, 16 Jan 2023 00:20:32 -0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E8=A7=A3=E5=86=B3release1.0.1?= =?UTF-8?q?=E5=88=86=E6=94=AFfix=20CVE-2022-3109=E6=BC=8F=E6=B4=9E?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanghao-free --- ffmpeg-y/libavcodec/vp3.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ffmpeg-y/libavcodec/vp3.c b/ffmpeg-y/libavcodec/vp3.c index 6fe1ca46a3..3a613d8310 100755 --- a/ffmpeg-y/libavcodec/vp3.c +++ b/ffmpeg-y/libavcodec/vp3.c @@ -2722,8 +2722,13 @@ static int vp3_decode_frame(AVCodecContext *avctx, if ((ret = ff_thread_get_buffer(avctx, &s->current_frame, AV_GET_BUFFER_FLAG_REF)) < 0) goto error; - if (!s->edge_emu_buffer) + if (!s->edge_emu_buffer) { s->edge_emu_buffer = av_malloc(9 * FFABS(s->current_frame.f->linesize[0])); + if (!s->edge_emu_buffer) { + ret = AVERROR(ENOMEM); + goto error; + } + } if (s->keyframe) { if (!s->theora) { -- Gitee