diff --git a/hashmgr-add-word.patch b/hashmgr-add-word.patch new file mode 100644 index 0000000..b464fd9 --- /dev/null +++ b/hashmgr-add-word.patch @@ -0,0 +1,13 @@ +Index: hunspell-1.3.2/src/hunspell/hashmgr.cxx +=================================================================== +--- hunspell-1.3.2.orig/src/hunspell/hashmgr.cxx ++++ hunspell-1.3.2/src/hunspell/hashmgr.cxx +@@ -116,7 +116,7 @@ int HashMgr::add_word(const char * word, + int al, const char * desc, bool onlyupcase) + { + bool upcasehomonym = false; +- int descl = desc ? (aliasm ? sizeof(short) : strlen(desc) + 1) : 0; ++ int descl = desc ? (aliasm ? sizeof(char *) : strlen(desc) + 1) : 0; + // variable-length hash record with word and optional fields + struct hentry* hp = + (struct hentry *) malloc (sizeof(struct hentry) + wbl + descl); diff --git a/hunspell.changes b/hunspell.changes index cd60f8a..e4f9819 100644 --- a/hunspell.changes +++ b/hunspell.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Feb 21 20:50:48 UTC 2014 - schwab@linux-m68k.org + +- hashmgr-add-word.patch: fix allocation error in HashMgr::add_word (from + http://sourceforge.net/p/hunspell/patches/49/) + ------------------------------------------------------------------- Thu Mar 28 08:46:28 UTC 2013 - mmeister@suse.com diff --git a/hunspell.spec b/hunspell.spec index a3e5e07..5b08e39 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -27,6 +27,7 @@ Release: 0 Url: http://hunspell.sourceforge.net/ Source0: http://downloads.sourceforge.net/project/%{name}/Hunspell/%{version}/%{name}-%{version}.tar.gz Source1: baselibs.conf +Patch0: hashmgr-add-word.patch BuildRequires: autoconf >= 2.59 BuildRequires: automake BuildRequires: gcc-c++ @@ -73,6 +74,7 @@ Static hunspell library. %prep %setup -q +%patch0 -p1 %build %configure \