fix CVE-2024-32230

This commit is contained in:
happyworker 2024-07-05 17:19:11 +08:00
parent aa0db13be3
commit 0ca9fbdd84
2 changed files with 34 additions and 1 deletions

View File

@ -61,7 +61,7 @@ ExclusiveArch: armv7hnl
Summary: Digital VCR and streaming server
Name: ffmpeg%{?flavor}
Version: 4.2.4
Release: 13
Release: 14
License: %{ffmpeg_license}
URL: http://ffmpeg.org/
%if 0%{?date}
@ -84,6 +84,9 @@ Patch11: fix-CVE-2023-51793.patch
Patch12: fix-CVE-2023-50010.patch
Patch13: CVE-2021-38171.patch
Patch14: CVE-2021-28429.patch
Patch15: fix-CVE-2024-32230.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%{?_with_cuda:BuildRequires: cuda-minimal-build-%{_cuda_version_rpm} cuda-drivers-devel}
%{?_with_libnpp:BuildRequires: pkgconfig(nppc-%{_cuda_version})}
@ -416,6 +419,9 @@ install -pm755 tools/qt-faststart %{buildroot}%{_bindir}
%changelog
* Fri Jul 5 CST 2024 happyworker <208suo@208suo.com> - 4.2.4-14
- Fix CVE-2024-32230
* Thu Jul 4 2024 happyworker <208suo@208suo.com> - 4.2.4-13
- Fix CVE-2021-28429

27
fix-CVE-2024-32230.patch Normal file
View File

@ -0,0 +1,27 @@
From 45d322be951e826aac1ed838317e9f535ebcf045 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michael@niedermayer.cc>
Date: Fri, 5 Jul 2024 17:14:07 +0800
Subject: [PATCH] avcodec/mpegvideo_enc: Fix 1 line and one column images
---
libavcodec/mpegvideo_enc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index ae3b131..d0ad941 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1234,8 +1234,8 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
int dst_stride = i ? s->uvlinesize : s->linesize;
int h_shift = i ? h_chroma_shift : 0;
int v_shift = i ? v_chroma_shift : 0;
- int w = s->width >> h_shift;
- int h = s->height >> v_shift;
+ int w = AV_CEIL_RSHIFT(s->width , h_shift);
+ int h = AV_CEIL_RSHIFT(s->height, v_shift);
uint8_t *src = pic_arg->data[i];
uint8_t *dst = pic->f->data[i];
int vpad = 16;
--
2.27.0