public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/mythes] rawhide: Fix build failure in rawhide by using upstream patch
@ 2026-11-02 9:11 Parag Nemade
0 siblings, 0 replies; only message in thread
From: Parag Nemade @ 2026-11-02 9:11 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/mythes
Branch : rawhide
Commit : 484bed54a0b5d7252718076c84d657adde9850c9
Author : Parag Nemade <panemade AT redhat DOT com>
Date : 2026-11-02T11:59:58+05:30
Stats : +30/-2 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/mythes/c/484bed54a0b5d7252718076c84d657adde9850c9?branch=rawhide
Log:
Fix build failure in rawhide by using upstream patch
---
diff --git a/mythes-1.2.6-index-words-shorter-than-MAX_WD_LEN.patch b/mythes-1.2.6-index-words-shorter-than-MAX_WD_LEN.patch
new file mode 100644
index 0000000..e6490ce
--- /dev/null
+++ b/mythes-1.2.6-index-words-shorter-than-MAX_WD_LEN.patch
@@ -0,0 +1,24 @@
+From 61597ef51bf9e82d0387a12d5a42ad77f2a572cd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolan.mcnamara@collabora.com>
+Date: Sat, 17 Oct 2026 18:08:39 +0000
+Subject: [PATCH] return no meanings for a word longer than any index word
+
+---
+ mythes.cxx | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mythes.cxx b/mythes.cxx
+index e43aca0..9b92a5e 100644
+--- a/mythes.cxx
++++ b/mythes.cxx
+@@ -159,9 +159,9 @@ int MyThes::Lookup(const char * pText, int len, mentry** pme)
+ // handle the case of missing file or file related errors
+ if (! pdfile) return 0;
+
+- // check we can allocate enough memory for the string
++ // index words are shorter than MAX_WD_LEN, so a longer word has no entry
+ std::vector<char> buffer;
+- if (len < 1 || len > buffer.max_size() - 1) {
++ if (len < 1 || len >= MAX_WD_LEN) {
+ return 0;
+ }
diff --git a/mythes.spec b/mythes.spec
index 6c74369..30c049a 100644
--- a/mythes.spec
+++ b/mythes.spec
@@ -4,6 +4,8 @@ Version: 1.2.6
Release: 1%{?dist}
Source: https://github.com/hunspell/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
URL: https://github.com/hunspell/mythes
+# upstream fix https://github.com/hunspell/mythes/commit/61597ef51bf9e82d0387a12d5a42ad77f2a572cd
+Patch0: mythes-1.2.6-index-words-shorter-than-MAX_WD_LEN.patch
License: BSD-3-Clause-Modification AND MIT
BuildRequires: make
BuildRequires: hunspell-devel, gcc-c++
@@ -21,7 +23,7 @@ Summary: Files for developing with mythes
Includes and definitions for developing with mythes
%prep
-%setup -q
+%autosetup -p1
%build
%configure --disable-rpath --disable-static
@@ -33,7 +35,6 @@ make check
./example morph.idx morph.dat morph.lst morph.aff morph.dic
%install
-rm -rf $RPM_BUILD_ROOT
%make_install
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
@@ -54,6 +55,9 @@ mkdir -p $RPM_BUILD_ROOT/%{_datadir}/mythes
%{_bindir}/th_gen_idx.pl
%changelog
+* Mon Nov 02 2026 Parag Nemade <panemade AT redhat DOT com> - 1.2.6-2
+- Fix build failure in rawhide by using upstream patch
+
* Mon Nov 02 2026 Parag Nemade <panemade AT redhat DOT com> - 1.2.6-1
- New upstream release 1.2.6 (rhbz#2564591)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-02 9:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02 9:11 [rpms/mythes] rawhide: Fix build failure in rawhide by using upstream patch Parag Nemade
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox