diff --git a/backport-CVE-2022-31782.patch b/backport-CVE-2022-31782.patch new file mode 100644 index 0000000000000000000000000000000000000000..bb41044dd07a0d31a64c261d4c344b1faa9a2059 --- /dev/null +++ b/backport-CVE-2022-31782.patch @@ -0,0 +1,27 @@ +From 3541af5e7805a4d897b8a1b199eb5037b9f1a477 Mon Sep 17 00:00:00 2001 +From: Alexei Podtelezhnikov +Date: Tue, 24 May 2022 18:24:18 +0000 +Subject: [PATCH] * src/ftbench.c (main): Check the number of glyphs. + +Fixes #8. +--- + ft2demos-2.12.1/src/ftbench.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/ft2demos-2.12.1/src/ftbench.c b/ft2demos-2.12.1/src/ftbench.c +index c57b5282..7dfe8ea4 100644 +--- a/ft2demos-2.12.1/src/ftbench.c ++++ b/ft2demos-2.12.1/src/ftbench.c +@@ -1242,6 +1242,9 @@ + if ( get_face( &face ) ) + goto Exit; + ++ if ( !face->num_glyphs ) ++ goto Exit; ++ + if ( first_index >= face->num_glyphs ) + first_index = face->num_glyphs - 1; + if ( last_index >= face->num_glyphs ) +-- +GitLab + diff --git a/freetype.spec b/freetype.spec index 169eb895b53e4d68b61cccbecd1b478bed43b4c0..4164d6160c36fd7db1879dc4fd822f31aa776ad0 100644 --- a/freetype.spec +++ b/freetype.spec @@ -4,7 +4,7 @@ Name: freetype Version: 2.12.1 -Release: 5 +Release: 6 Summary: FreeType is a freely available software library to render fonts License: (FTL or GPLv2+) and BSD and MIT and Public Domain and zlib with acknowledgement URL: http://www.freetype.org @@ -24,6 +24,7 @@ Patch6004: backport-freetype-2.10.0-internal-outline.patch Patch6005: backport-freetype-2.10.1-debughook.patch Patch6006: backport-CVE-2023-2004.patch Patch6007: backport-Minimal-stop-gap-fix-for-CVE-2025-27363.patch +Patch6008: backport-CVE-2022-31782.patch BuildRequires: gcc libX11-devel libpng-devel zlib-devel bzip2-devel meson @@ -73,6 +74,7 @@ popd %patch6005 -p1 %patch6006 -p1 %patch6007 -p1 +%patch6008 -p1 %build %configure --disable-static --with-zlib=yes --with-bzip2=yes --with-png=yes --enable-freetype-config --with-harfbuzz=no @@ -153,6 +155,9 @@ meson test -C out %{_mandir}/man1/* %changelog +* Thu Jul 24 2025 wangkun - 2.12.1-6 +- fix CVE-2022-31782 + * Mon Apr 14 2025 zhangpan - 2.12.1-5 - update CVE-2025-27363 patch