From 031975adf630fa1987558e7a7d3cd8bbe600c666 Mon Sep 17 00:00:00 2001 From: Mike FABIAN Date: Wed, 26 Aug 2015 15:47:46 +0200 Subject: [PATCH] Fix "Transliteration not working on Marathi language" It crashed when trying to transliterate Marathi using itrans via libtranslit. Resolves: rhbz#1256244 --- ...fix-crash-in-marathi-transliteration.patch | 43 +++++++++++++++++++ m17n-lib.spec | 8 +++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 m17n-lib-1.7.0-fix-crash-in-marathi-transliteration.patch diff --git a/m17n-lib-1.7.0-fix-crash-in-marathi-transliteration.patch b/m17n-lib-1.7.0-fix-crash-in-marathi-transliteration.patch new file mode 100644 index 0000000..bcfcaac --- /dev/null +++ b/m17n-lib-1.7.0-fix-crash-in-marathi-transliteration.patch @@ -0,0 +1,43 @@ +From 868093b0b0504da6693f5e868e7deb468009b5af Mon Sep 17 00:00:00 2001 +From: Mike FABIAN +Date: Wed, 26 Aug 2015 15:42:28 +0200 +Subject: [PATCH] Bug 1256244 - Transliteration not working on Marathi language + +--- + src/input.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/input.c b/src/input.c +index 1160085..5a86b10 100644 +--- a/src/input.c ++++ b/src/input.c +@@ -1083,7 +1083,7 @@ load_translation (MIMMap *map, MPlist *keylist, MPlist *map_actions, + len = MPLIST_LENGTH (elt); + if (MFAILP (len > 0)) + return -1; +- keyseq = (MSymbol *) alloca (sizeof (int) * len); ++ keyseq = (MSymbol *) alloca (sizeof (MSymbol) * len); + for (i = 0; i < len; i++, elt = MPLIST_NEXT (elt)) + { + if (MPLIST_INTEGER_P (elt)) +@@ -4264,7 +4264,7 @@ filter (MInputContext *ic, MSymbol key, void *arg) + if (ic_info->commit_key_head > 0) + { + memmove (ic_info->keys, ic_info->keys + ic_info->commit_key_head, +- sizeof (int) * (ic_info->used - ic_info->commit_key_head)); ++ sizeof (MSymbol *) * (ic_info->used - ic_info->commit_key_head)); + ic_info->used -= ic_info->commit_key_head; + ic_info->key_head -= ic_info->commit_key_head; + ic_info->state_key_head -= ic_info->commit_key_head; +@@ -4278,7 +4278,7 @@ filter (MInputContext *ic, MSymbol key, void *arg) + if (ic_info->key_head > 0) + { + memmove (ic_info->keys, ic_info->keys + ic_info->key_head, +- sizeof (int) * (ic_info->used - ic_info->key_head)); ++ sizeof (MSymbol *) * (ic_info->used - ic_info->key_head)); + ic_info->used -= ic_info->key_head; + ic_info->key_head = ic_info->state_key_head + = ic_info->commit_key_head = 0; +-- +2.4.3 + diff --git a/m17n-lib.spec b/m17n-lib.spec index 9075c29..de1d334 100644 --- a/m17n-lib.spec +++ b/m17n-lib.spec @@ -3,13 +3,14 @@ Name: m17n-lib Version: 1.7.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Multilingual text library License: LGPLv2+ URL: http://www.nongnu.org/m17n/ Source0: http://download.savannah.gnu.org/releases/m17n/%{name}-%{version}.tar.gz Patch0: %{name}-1.6.1-multilib.patch +Patch1: %{name}-1.7.0-fix-crash-in-marathi-transliteration.patch BuildRequires: m17n-db-devel libthai-devel BuildRequires: libxml2-devel libXft-devel @@ -60,6 +61,7 @@ Tools to test M17n GUI widget library. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build autoreconf -ivf @@ -113,6 +115,10 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %{_libdir}/libm17n-gui.so.* %changelog +* Wed Aug 26 2015 Mike FABIAN - 1.7.0-4 +- Fix "Transliteration not working on Marathi language" (it crashed). +- Resolves: rhbz#1256244 + * Wed Jun 17 2015 Fedora Release Engineering - 1.7.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild