From ac00d50e50d621e165a9ae96ac80c9db2cea21fd Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Aug 29 2016 11:25:30 +0000 Subject: Resolves: rhbz#1368765 null-deref with input above the BMP --- diff --git a/0001-moz-1256496-we-unset-the-utf-8-bit-and-reset-it-agai.patch b/0001-moz-1256496-we-unset-the-utf-8-bit-and-reset-it-agai.patch new file mode 100644 index 0000000..709d389 --- /dev/null +++ b/0001-moz-1256496-we-unset-the-utf-8-bit-and-reset-it-agai.patch @@ -0,0 +1,24 @@ +From e3ee8f770d709ee93062a97be7ff88293a1e5ece Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Wed, 6 Apr 2016 11:18:29 +0100 +Subject: [PATCH] moz#1256496 we *unset* the utf-8 bit and reset it again later + +which seems bizarre to me, but if we do this then csconv may +be null, detect that and skip. +--- + 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 0403cf4..5a22167 100644 +--- a/src/hunspell/suggestmgr.cxx ++++ b/src/hunspell/suggestmgr.cxx +@@ -1853,7 +1853,7 @@ + int l1 = strlen(s1); + int l2 = strlen(s2); + if (*(s2+l1-1) == *(s2+l2-1)) return 1; +- } else { ++ } else if (csconv) { + char * olds = s1; + // decapitalise dictionary word + if ((*s1 != *s2) && (*s1 != csconv[((unsigned char)*s2)].clower)) return 0; diff --git a/hunspell.spec b/hunspell.spec index e2aee93..4893caf 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -3,7 +3,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.3.3 -Release: 9%{?dist} +Release: 10%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -19,6 +19,7 @@ BuildRequires: words Requires: hunspell-en-US Patch1: hunspell.rhbz915448.patch Patch2: 0001-Resolves-rhbz-1261421-crash-on-mashing-hangul-korean.patch +Patch3: 0001-moz-1256496-we-unset-the-utf-8-bit-and-reset-it-agai.patch %description Hunspell is a spell checker and morphological analyzer library and program @@ -38,6 +39,7 @@ Includes and definitions for developing with hunspell %setup -q %patch1 -p0 -b .rhbz915448 %patch2 -p1 -b .rhbz1261421 +%patch3 -p1 -b .rhbz1368765 %build configureflags="--disable-rpath --disable-static --with-ui --with-readline" @@ -124,6 +126,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/hunspell.5.gz %changelog +* Mon Aug 29 2016 Caolán McNamara - 1.3.3-10 +- Resolves: rhbz#1368765 null-deref with input above the BMP + * Wed Feb 03 2016 Fedora Release Engineering - 1.3.3-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild