From 47ca788b2ed8d0f699af5a4448572916ccfa2d74 Mon Sep 17 00:00:00 2001 From: happyworker <208suo@208suo.com> Date: Wed, 18 Sep 2024 16:00:22 +0800 Subject: [PATCH] fix CVE-2020-35965.patch (cherry picked from commit d6bc20d681e3b6724e49f0021807760bc12839bb) --- CVE-2020-35965.patch | 25 +++++++++++++++++++++++++ ffmpeg.spec | 6 +++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 CVE-2020-35965.patch diff --git a/CVE-2020-35965.patch b/CVE-2020-35965.patch new file mode 100644 index 0000000..1d965fa --- /dev/null +++ b/CVE-2020-35965.patch @@ -0,0 +1,25 @@ +From 1672c855be7edde17571f98fa603c4fc5270e516 Mon Sep 17 00:00:00 2001 +From: happyworker <208suo@208suo.com> +Date: Wed, 18 Sep 2024 15:57:22 +0800 +Subject: [PATCH] CVE-2020-35965 + +--- + libavcodec/exr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libavcodec/exr.c b/libavcodec/exr.c +index ba6e3fd..5558d55 100644 +--- a/libavcodec/exr.c ++++ b/libavcodec/exr.c +@@ -1791,7 +1791,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, + ptr = picture->data[0]; + + // Zero out the start if ymin is not 0 +- for (y = 0; y < s->ymin; y++) { ++ for (y = 0; y < FFMIN(s->ymin, s->h); y++) { + memset(ptr, 0, out_line_size); + ptr += picture->linesize[0]; + } +-- +2.27.0 + diff --git a/ffmpeg.spec b/ffmpeg.spec index 45ebfd4..11cdeec 100644 --- a/ffmpeg.spec +++ b/ffmpeg.spec @@ -60,7 +60,7 @@ Summary: Digital VCR and streaming server Name: ffmpeg%{?flavor} Version: 4.2.4 -Release: 17 +Release: 18 License: %{ffmpeg_license} URL: http://ffmpeg.org/ %if 0%{?date} @@ -86,6 +86,7 @@ Patch14: CVE-2021-28429.patch Patch15: fix-CVE-2024-32230.patch Patch16: CVE-2022-1475.patch Patch17: CVE-2022-48434.patch +Patch18: CVE-2020-35965.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} %{?_with_cuda:BuildRequires: cuda-minimal-build-%{_cuda_version_rpm} cuda-drivers-devel} @@ -419,6 +420,9 @@ install -pm755 tools/qt-faststart %{buildroot}%{_bindir} %changelog +* Wed Sep 18 2024 happyworker <208suo@208suo.com> - 4.2.4-18 +- Fix CVE-2020-35965.patch + * Mon Jul 15 2024 happyworker <208suo@208suo.com> - 4.2.4-17 - Fix CVE-2022-48434