[anthy] Fix a segfault issue. (#973127)

Akira TAGOH tagoh at fedoraproject.org
Mon Jun 17 10:33:18 UTC 2013


commit 9b3d81882f711d4d7fa87fc9e6c35c808398ec54
Author: Akira TAGOH <tagoh at redhat.com>
Date:   Mon Jun 17 19:33:09 2013 +0900

    Fix a segfault issue. (#973127)

 anthy-fix-segfault.patch |   14 ++++++++++++++
 anthy.spec               |   17 +++++++++++------
 2 files changed, 25 insertions(+), 6 deletions(-)
---
diff --git a/anthy-fix-segfault.patch b/anthy-fix-segfault.patch
new file mode 100644
index 0000000..aff744e
--- /dev/null
+++ b/anthy-fix-segfault.patch
@@ -0,0 +1,14 @@
+diff -pruN anthy-9100h.orig/src-diclib/xstr.c anthy-9100h/src-diclib/xstr.c
+--- anthy-9100h.orig/src-diclib/xstr.c	2009-01-23 12:31:31.000000000 +0900
++++ anthy-9100h/src-diclib/xstr.c	2013-06-17 19:30:08.000000000 +0900
+@@ -384,6 +384,10 @@ int
+ anthy_xstrcmp(xstr *x1, xstr *x2)
+ {
+   int i, m;
++  if (!x1)
++    return -1;
++  if (!x2)
++    return 1;
+   if (x1->len < x2->len) {
+     m = x1->len;
+   }else{
diff --git a/anthy.spec b/anthy.spec
index 8467988..d3f63d1 100644
--- a/anthy.spec
+++ b/anthy.spec
@@ -3,7 +3,7 @@
 
 Name:  anthy
 Version: 9100h
-Release: 22%{?dist}
+Release: 23%{?dist}
 # The entire source code is LGPLv2+ and dictionaries is GPLv2. the corpus data is under Public Domain.
 License: LGPLv2+ and GPLv2 and Public Domain
 URL:  http://sourceforge.jp/projects/anthy/
@@ -13,12 +13,13 @@ BuildRequires: xemacs
 %endif
 
 Source0: http://osdn.dl.sourceforge.jp/anthy/37536/anthy-%{version}.tar.gz
-Source1: anthy-init.el
-Patch0:  anthy-fix-typo-in-dict.patch
-Patch1:  anthy-fix-typo-in-dict-name.patch
-Patch10: anthy-corpus.patch
-Patch11: anthy-fix-elisp.patch
+Source1: %{name}-init.el
+Patch0:  %{name}-fix-typo-in-dict.patch
+Patch1:  %{name}-fix-typo-in-dict-name.patch
+Patch10: %{name}-corpus.patch
+Patch11: %{name}-fix-elisp.patch
 Patch12: %{name}-aarch64.patch
+Patch13: %{name}-fix-segfault.patch
 
 Summary: Japanese character set input library
 Group:  System Environment/Libraries
@@ -93,6 +94,7 @@ package to use Anthy with XEmacs.
 %patch10 -p1 -b .10-corpus
 %patch11 -p1 -b .11-elisp
 %patch12 -p1 -b .12-aarch64
+%patch13 -p1 -b .13-segv
 
 # Convert to utf-8
 for file in ChangeLog doc/protocol.txt; do
@@ -221,6 +223,9 @@ popd
 %endif
 
 %changelog
+* Mon Jun 17 2013 Akira TAGOH <tagoh at redhat.com> - 9100h-23
+- Fix a segfault issue. (#973127)
+
 * Wed Mar 27 2013 Akira TAGOH <tagoh at redhat.com> - 9100h-22
 - Rebuilt for aarch64 support (#925002)
 


More information about the scm-commits mailing list