From ca1352db93a428aa739fb27675f8daceaf766bef Mon Sep 17 00:00:00 2001 From: Caolan McNamara Date: Fri, 29 Jun 2007 11:31:21 +0000 Subject: [PATCH] memory leak --- hunspell-1.1.5.freem.patch | 17 +++++++++++++++++ hunspell.spec | 10 ++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 hunspell-1.1.5.freem.patch diff --git a/hunspell-1.1.5.freem.patch b/hunspell-1.1.5.freem.patch new file mode 100644 index 0000000..32cac27 --- /dev/null +++ b/hunspell-1.1.5.freem.patch @@ -0,0 +1,17 @@ +diff -ru hunspell-1.1.5.orig/src/hunspell/hunspell.cxx hunspell-1.1.5/src/hunspell/hunspell.cxx +--- hunspell-1.1.5.orig/src/hunspell/hunspell.cxx 2007-06-29 12:12:57.000000000 +0100 ++++ hunspell-1.1.5/src/hunspell/hunspell.cxx 2007-06-29 12:18:31.000000000 +0100 +@@ -1674,7 +1674,12 @@ + if (!word) return 0; + char * m = morph(word); + if(!m) return 0; +- if (!out) return line_tok(m, out); ++ if (!out) ++ { ++ n = line_tok(m, out); ++ free(m) ++ return n; ++ } + + // without memory allocation + /* BUG missing buffer size checking */ diff --git a/hunspell.spec b/hunspell.spec index 71b3577..095d342 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -1,7 +1,7 @@ Name: hunspell Summary: Hunspell is a spell checker and morphological analyzer library Version: 1.1.5.3 -Release: 4%{?dist} +Release: 5%{?dist} Source: http://downloads.sourceforge.net/%{name}/hunspell-1.1.5-3.tar.gz Group: System Environment/Libraries URL: http://hunspell.sourceforge.net/ @@ -12,6 +12,7 @@ BuildRequires: libtool Patch0: hunspell-1.1.4-defaultdictfromlang.patch Patch1: hunspell-1.1.5-badheader.patch Patch2: hunspell-1.1.5.encoding.patch +Patch3: hunspell-1.1.5.freem.patch %description Hunspell is a spell checker and morphological analyzer library and program @@ -31,7 +32,8 @@ Includes and definitions for developing with hunspell %setup -q -n hunspell-1.1.5 %patch0 -p1 -b .defaultdictfromlang.patch %patch1 -p1 -b .badheader.patch -%patch2 -p1 -b .hunspell-1.1.5.encoding.patch +%patch2 -p1 -b .encoding.patch +%patch3 -p1 -b .freem.patch %build libtoolize --automake --force @@ -82,6 +84,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/hunspell.pc %changelog +* Fri Jun 29 2007 Caolan McNamara - 1.1.5.3-5 +- fix memory leak + http://sourceforge.net/tracker/index.php?func=detail&aid=1745263&group_id=143754&atid=756395 + * Wed Jun 06 2007 Caolan McNamara - 1.1.5.3-4 - Resolves: rhbz#212984 discovered problem with missing wordchars