Compare commits

..

No commits in common. 'c9' and 'c10-beta' have entirely different histories.
c9 ... c10-beta

2
.gitignore vendored

@ -1 +1 @@
SOURCES/v1.7.0.tar.gz
SOURCES/hunspell-1.7.2.tar.gz

@ -1 +1 @@
e42ea8342a191b9cd7da57d0d6ad4ae1566c5dcc SOURCES/v1.7.0.tar.gz
ad05655ccdb21637237cddd1603c9ee400b1fd8c SOURCES/hunspell-1.7.2.tar.gz

@ -0,0 +1,77 @@
From e2fe9f86e1769b440972971240e9b8fb1cd53b97 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 6 Jan 2023 16:20:45 +0000
Subject: [PATCH] Resolves: rhbz#2158548 allow longer words for hunspell-ko
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
https://github.com/hunspell/hunspell/issues/903
A problem since the sanity check added in:
commit 05e44e069e4cfaa9ce1264bf13f23fc9abd7ed05
Author: Caolán McNamara <caolanm@redhat.com>
Date: Thu Sep 1 13:46:40 2022 +0100
Check word limit (#813)
* check against hentry blen max
---
src/hunspell/hashmgr.cxx | 6 +++---
src/hunspell/htypes.hxx | 4 ++--
tests/korean.dic | 3 ++-
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/hunspell/hashmgr.cxx b/src/hunspell/hashmgr.cxx
index 100916d..14201e9 100644
--- a/src/hunspell/hashmgr.cxx
+++ b/src/hunspell/hashmgr.cxx
@@ -209,7 +209,7 @@ int HashMgr::add_word(const std::string& in_word,
}
// limit of hp->blen
- if (word->size() > std::numeric_limits<unsigned char>::max()) {
+ if (word->size() > std::numeric_limits<unsigned short>::max()) {
HUNSPELL_WARNING(stderr, "error: word len %ld is over max limit\n", word->size());
delete desc_copy;
delete word_copy;
@@ -235,8 +235,8 @@ int HashMgr::add_word(const std::string& in_word,
int i = hash(hpw, word->size());
- hp->blen = (unsigned char)word->size();
- hp->clen = (unsigned char)wcl;
+ hp->blen = (unsigned short)word->size();
+ hp->clen = (unsigned short)wcl;
hp->alen = (short)al;
hp->astr = aff;
hp->next = NULL;
diff --git a/src/hunspell/htypes.hxx b/src/hunspell/htypes.hxx
index 44366b1..2b896fb 100644
--- a/src/hunspell/htypes.hxx
+++ b/src/hunspell/htypes.hxx
@@ -62,8 +62,8 @@
#endif
struct hentry {
- unsigned char blen; // word length in bytes
- unsigned char clen; // word length in characters (different for UTF-8 enc.)
+ unsigned short blen; // word length in bytes
+ unsigned short clen; // word length in characters (different for UTF-8 enc.)
short alen; // length of affix flag vector
unsigned short* astr; // affix flag vector
struct hentry* next; // next word with same hash code
diff --git a/tests/korean.dic b/tests/korean.dic
index 95cb450..d76ea05 100644
--- a/tests/korean.dic
+++ b/tests/korean.dic
@@ -1,3 +1,4 @@
-2
+3
들어오세요
안녕하세요
+김수한무거북이와두루미삼천갑자동방삭치치카포사리사리세ᅡ워리워리세브리캉무드셀ᅡ구름위허ᅵ케ᅵᆫᅦ담벼락서생원에ᄀ양
--
2.38.1

@ -1,25 +0,0 @@
From ac938e2ecb48ab4dd21298126c7921689d60571b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
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
@@ -2040,7 +2040,7 @@ int SuggestMgr::leftcommonsubstring(
int l2 = su2.size();
// decapitalize dictionary word
if (complexprefixes) {
- if (su1[l1 - 1] == su2[l2 - 1])
+ if (l1 && l2 && su1[l1 - 1] == su2[l2 - 1])
return 1;
} else {
unsigned short idx = su2.empty() ? 0 : (su2[0].h << 8) + su2[0].l;
--
2.23.0

@ -2,13 +2,13 @@
Name: hunspell
Summary: A spell checker and morphological analyzer library
Version: 1.7.0
Release: 11%{?dist}
Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz
Version: 1.7.2
Release: 8%{?dist}
Source: https://github.com/hunspell/hunspell/releases/download/v%{version}/hunspell-%{version}.tar.gz
URL: https://github.com/hunspell/hunspell
License: LGPLv2+ or GPLv2+ or MPLv1.1
License: LGPL-2.1-or-later OR GPL-2.0-or-later OR MPL-1.1
BuildRequires: gcc-c++
BuildRequires: autoconf, automake, libtool, ncurses-devel, gettext
BuildRequires: autoconf, automake, libtool, ncurses-devel, gettext-devel
BuildRequires: perl-generators
%ifarch %{ix86} x86_64
BuildRequires: valgrind
@ -18,14 +18,14 @@ BuildRequires: words
%endif
BuildRequires: make
Requires: hunspell-en-US
Requires: hunspell-filesystem
Requires: hunspell-filesystem = %{version}-%{release}
Patch0: 0001-invalid-read-memory-access-624.patch
Patch0: 0001-Resolves-rhbz-2158548-allow-longer-words-for-hunspel.patch
%description
Hunspell is a spell checker and morphological analyzer library and program
designed for languages with rich morphology and complex word compounding or
character encoding. Hunspell interfaces: Ispell-like terminal interface using
Hunspell is a spell checker and morphological analyzer library and program
designed for languages with rich morphology and complex word compounding or
character encoding. Hunspell interfaces: Ispell-like terminal interface using
Curses library, Ispell pipe interface, LibreOffice UNO module.
%package devel
@ -44,7 +44,7 @@ packages.
%prep
%setup -q
%patch0 -p1 -b .CVE-2019-16707
%patch0 -p1 -b .rhbz2158548
%build
autoreconf -vfi
@ -79,7 +79,6 @@ make distclean
%{profileuse} %configure $configureflags
%make_build
%endif
cd po && %make_build update-gmo && cd ..
%check
%ifarch %{ix86} x86_64
@ -92,6 +91,7 @@ rm -rf $RPM_BUILD_ROOT
%make_install
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
mkdir $RPM_BUILD_ROOT/%{_datadir}/hunspell
mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell
%find_lang %{name}
@ -125,15 +125,80 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell
%{_mandir}/man5/hunspell.5.gz
%files filesystem
%{_datadir}/hunspell
%{_datadir}/myspell
%changelog
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.7.0-11
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.7.2-8
- Bump release for June 2024 mass rebuild
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.7.0-10
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jan 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Feb 22 2023 Caolán McNamara <caolanm@redhat.com> - 1.7.2-4
- migrated to SPDX license
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jan 06 2023 Caolán McNamara <caolanm@redhat.com> - 1.7.2-2
- Resolves: rhbz#2158548 get hunspell-ko working again
* Fri Dec 30 2022 Caolán McNamara <caolanm@redhat.com> - 1.7.2-1
- Resolves: rhbz#2157049 latest release
* Mon Aug 22 2022 Caolán McNamara <caolanm@redhat.com> - 1.7.1-1
- latest release
* Tue Aug 02 2022 Caolán McNamara <caolanm@redhat.com> - 1.7.0-21
- Resolves: rhbz#2113444 FTBFS
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Mar 16 2022 Jens Petersen <petersen@redhat.com> - 1.7.0-19
- rework the new hunspell dictionary directory (#2064189)
- drop the myspell/ compatibility symlink
- keep myspell/ as directory and also the new hunspell/ dir
- because of this drop the duplicate directory patch for #2060751
- filesystem scriptlets are no more
* Mon Mar 07 2022 Caolán McNamara <caolanm@redhat.com> - 1.7.0-18
- Resolves: rhbz#2060751 - “hunspell -D” lists dictionaries twice
* Thu Feb 10 2022 Jens Petersen <petersen@redhat.com> - 1.7.0-17
- revert post script from lua back to shell to unbreak rpm-ostree compose
* Mon Feb 7 2022 Jens Petersen <petersen@redhat.com> - 1.7.0-16
- pretrans and post scriptlets should be for filesystem!
(fixes #2051360 regression reported by Mike Fabian)
* Wed Jan 26 2022 Jens Petersen <petersen@redhat.com> - 1.7.0-15
- improve the filesystem pretrans and post scripts:
- pretrans now checks if /usr/share/hunspell exists first
- post checks that /usr/share/myspell does not exist
* Wed Jan 26 2022 Jens Petersen <petersen@redhat.com> - 1.7.0-14
- requires coreutils for post script (#2045568)
* Fri Jan 21 2022 Vishal Vijayraghavan <vishalvvr@fedoraproject.org> - 1.7.0-13
- Rename install dir from myspell to hunspell & create symlink myspell
- https://fedoraproject.org/wiki/Changes/Hunspell_dictionary_dir_change
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Mar 25 2021 Caolán McNamara <caolanm@redhat.com> - 1.7.0-10
- Resolves: rhbz#1943087 require gettext-devel for autopoint
* Wed Feb 03 2021 Peter Oliver <rpm@mavit.org.uk> - 1.7.0-9
- Accomodate Nuspell by putting the dictionary dir in its own subpackage.
@ -366,7 +431,7 @@ mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell
- sort as per "C" locale
* Fri Oct 17 2008 Caolán McNamara <caolanm@redhat.com> - 1.2.7-4
- make wordlist2hunspell remove blank lines
- make wordlist2hunspell remove blank lines
* Mon Sep 15 2008 Caolán McNamara <caolanm@redhat.com> - 1.2.7-3
- Workaround rhbz#462184 uniq/sort problems with viramas

Loading…
Cancel
Save