diff --git a/SOURCES/0001-invalid-read-memory-access-624.patch b/SOURCES/0001-invalid-read-memory-access-624.patch new file mode 100644 index 0000000..40703d0 --- /dev/null +++ b/SOURCES/0001-invalid-read-memory-access-624.patch @@ -0,0 +1,25 @@ +From ac938e2ecb48ab4dd21298126c7921689d60571b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Tue, 12 Nov 2019 20:03:15 +0000 +Subject: [PATCH] invalid read memory access #624 + +--- + src/hunspell/suggestmgr.cxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hunspell/suggestmgr.cxx b/src/hunspell/suggestmgr.cxx +index dba084e..c23f165 100644 +--- a/src/hunspell/suggestmgr.cxx ++++ b/src/hunspell/suggestmgr.cxx +@@ -1812,7 +1812,7 @@ int SuggestMgr::leftcommonsubstring(char * s1, const char * s2) { + if (complexprefixes) { + int l1 = u8_u16(su1, MAXSWL, s1); + int l2 = u8_u16(su2, MAXSWL, s2); +- if (*((short *)su1+l1-1) == *((short *)su2+l2-1)) return 1; ++ if (l1 && l2 && *((short *)su1+l1-1) == *((short *)su2+l2-1)) return 1; + } else { + int i; + u8_u16(su1, 1, s1); +-- +2.23.0 + diff --git a/SPECS/hunspell.spec b/SPECS/hunspell.spec index 96d0a6b..f2a8eec 100644 --- a/SPECS/hunspell.spec +++ b/SPECS/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.2 -Release: 15%{?dist} +Release: 16%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -22,6 +22,7 @@ Patch1: hunspell.rhbz918938.patch Patch2: hunspell-aarch64.patch Patch3: 0001-Resolves-rhbz-1261421-crash-on-mashing-hangul-korean.patch Patch4: hunspell.rhbz915448.patch +Patch5: 0001-invalid-read-memory-access-624.patch %description Hunspell is a spell checker and morphological analyzer library and program @@ -44,6 +45,7 @@ Includes and definitions for developing with hunspell %patch2 -p1 -b .aarch64 %patch3 -p1 -b .rhbz-1261421-crash-on-mashing-hangul-korean %patch4 -p0 -b .rhbz915448 +%patch5 -p1 -b .CVE-2019-16707 %build configureflags="--disable-rpath --disable-static --with-ui --with-readline" @@ -133,6 +135,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/hunspell.3.gz %changelog +* Tue Apr 14 2020 Caolán McNamara - 1.3.2-16 +- Resolves: rhbz#1775556 CVE-2019-16707 + * Wed Aug 10 2016 Caolán McNamara - 1.3.2-15 - Resolves: rhbz#1262755 bad UTF-8 char count in pipe mode