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..c423db9 --- /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.changes b/m17n-lib.changes index 0520e22..49c7420 100644 --- a/m17n-lib.changes +++ b/m17n-lib.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Dec 7 10:38:53 UTC 2016 - maiku.fabian@gmail.com + +- Fix crash in Marathi transliteration: + m17n-lib-1.7.0-fix-crash-in-marathi-transliteration.patch + See also: + https://lists.nongnu.org/archive/html/m17n-list/2015-08/msg00001.html + https://lists.nongnu.org/archive/html/m17n-list/2015-08/msg00002.html + ------------------------------------------------------------------- Sun Mar 1 18:02:09 UTC 2015 - p.drouand@gmail.com diff --git a/m17n-lib.spec b/m17n-lib.spec index e1d1d63..acb417c 100644 --- a/m17n-lib.spec +++ b/m17n-lib.spec @@ -1,7 +1,7 @@ # # spec file for package m17n-lib # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,6 +28,7 @@ Source0: http://download.savannah.gnu.org/releases/m17n/%{name}-%{version Source1: m17n-lib-rpmlintrc Source2: baselibs.conf Patch0: m17n-lib-fix-warnings.diff +Patch1: m17n-lib-1.7.0-fix-crash-in-marathi-transliteration.patch BuildRequires: fdupes BuildRequires: freetype2-devel BuildRequires: fribidi-devel @@ -69,6 +70,7 @@ A multilingual text processing library for the C language %prep %setup -q %patch0 -p1 +%patch1 -p1 %build export SUSE_ASNEEDED=0