File ffmpeg-CVE-2022-3109.patch of Package ffmpeg.32491
diff --unified --recursive --text --new-file --color ffmpeg-3.4.2.old/libavcodec/vp3.c ffmpeg-3.4.2.new/libavcodec/vp3.c
--- ffmpeg-3.4.2.old/libavcodec/vp3.c 2022-12-26 14:31:04.018496321 +0800
+++ ffmpeg-3.4.2.new/libavcodec/vp3.c 2022-12-26 14:31:12.785166998 +0800
@@ -2099,8 +2099,13 @@
if (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) {