diff --git a/hunspell-1.2.8-2934195.suggestmgr.patch b/hunspell-1.2.8-2934195.suggestmgr.patch new file mode 100644 index 0000000..996a3d2 --- /dev/null +++ b/hunspell-1.2.8-2934195.suggestmgr.patch @@ -0,0 +1,25 @@ +diff -ru hunspell-1.2.8.orig/src/hunspell/suggestmgr.cxx hunspell-1.2.8/src/hunspell/suggestmgr.cxx +--- hunspell-1.2.8.orig/src/hunspell/suggestmgr.cxx 2010-01-18 09:25:59.000000000 +0000 ++++ hunspell-1.2.8/src/hunspell/suggestmgr.cxx 2010-01-18 09:34:58.000000000 +0000 +@@ -1742,11 +1742,10 @@ + if (ns < 2) break; + } + } else { +- char t[MAXSWUTF8L]; +- l1 = strlen(s1); + l2 = strlen(s2); + if (l2 == 0) return 0; +- strcpy(t, s2); ++ l1 = strlen(s1); ++ char *t = mystrdup(s2); + if (opt & NGRAM_LOWERING) mkallsmall(t, csconv); + for (int j = 1; j <= n; j++) { + ns = 0; +@@ -1759,6 +1758,7 @@ + nscore = nscore + ns; + if (ns < 2) break; + } ++ free(t); + } + + ns = 0; diff --git a/hunspell.spec b/hunspell.spec index dd7e42e..eac707f 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -1,7 +1,7 @@ Name: hunspell Summary: A spell checker and morphological analyzer library Version: 1.2.8 -Release: 13%{?dist} +Release: 14%{?dist} Source0: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Source1: http://people.debian.org/~agmartin/misc/ispellaff2myspell Source2: http://people.redhat.com/caolanm/hunspell/wordlist2hunspell @@ -15,6 +15,7 @@ Patch2: hunspell-1.2.8-2784983.defaultlanguage.patch Patch3: hunspell-1.2.8-2812045.warnings.fortify.patch Patch4: hunspell-1.2.8-2826164.fixtests.patch Patch5: hunspell-1.2.8-2910695.nohome.patch +Patch6: hunspell-1.2.8-2934195.suggestmgr.patch %description Hunspell is a spell checker and morphological analyzer library and program @@ -37,6 +38,7 @@ Includes and definitions for developing with hunspell %patch3 -p1 -b .warnings.fortify.patch %patch4 -p1 -b .fixtests.patch %patch5 -p1 -b .nohome.patch +%patch6 -p1 -b .suggestmgr.patch # Filter unwanted Requires for the "use explicitely" string in ispellaff2myspell cat << \EOF > %{name}-req #!/bin/sh @@ -127,6 +129,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/hunspell.3.gz %changelog +* Mon Jan 18 2010 Caolan McNamara - 1.2.8-14 +- Resolves: rhbz#554876 fix suggestmgr crash + * Tue Dec 08 2009 Caolan McNamara - 1.2.8-13 - Resolves: rhbz#544372 survive having no HOME