rpms/anthy/F-8 anthy-9100e-fix-segfault-vu.patch, NONE, 1.1 .cvsignore, 1.30, 1.31 anthy.spec, 1.45, 1.46 sources, 1.31, 1.32

Akira TAGOH (tagoh) fedora-extras-commits at redhat.com
Fri Jun 27 11:16:39 UTC 2008


Author: tagoh

Update of /cvs/pkgs/rpms/anthy/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25595

Modified Files:
	.cvsignore anthy.spec sources 
Added Files:
	anthy-9100e-fix-segfault-vu.patch 
Log Message:
* Fri Jun 27 2008 Akira TAGOH <tagoh at redhat.com> - 9100e-3
- Fix a segfault with some words containing vu. (#452779)

anthy-9100e-fix-segfault-vu.patch:

--- NEW FILE anthy-9100e-fix-segfault-vu.patch ---
diff -pruN anthy-9100e.orig/src-splitter/metaword.c anthy-9100e/src-splitter/metaword.c
--- anthy-9100e.orig/src-splitter/metaword.c	2007-06-18 08:27:38.000000000 +0900
+++ anthy-9100e/src-splitter/metaword.c	2008-06-27 11:53:55.000000000 +0900
@@ -17,6 +17,7 @@
 
 #include <anthy/record.h>
 #include <anthy/splitter.h>
+#include <anthy/xchar.h>
 #include <anthy/xstr.h>
 #include <anthy/segment.h>
 #include <anthy/segclass.h>
@@ -158,6 +159,18 @@ get_surrounding_text(struct splitter_con
     xs_post->len = post_len;
 }
 
+static int
+count_vu(xstr *xs)
+{
+  int i, r = 0;
+  for (i = 0; i < xs->len; i++) {
+    if (xs->str[i] == KK_VU) {
+      r++;
+    }
+  }
+  return r;
+}
+
 /*
  * Ê£¹ç¸ì¤Ç¤¢¤ëwl¤«¤énÈÖ¤á¤ÎÉôʬ¤ò¼è¤ê½Ð¤·¤Æmw¤Ë¤¹¤ë
  */
@@ -177,8 +190,12 @@ make_compound_nth_metaword(struct splitt
   get_surrounding_text(sc, wl, &xs_pre, &xs_post);
 
   for (i = 0; i <= nth; ++i) {
+    xstr part;
     from += len;
     len = anthy_compound_get_nth_segment_len(ce, i);
+    part.str = sc->ce[from].c;
+    part.len = len;
+    len -= count_vu(&part);
     if (i == 0) {
       len += xs_pre.len;
     }
@@ -742,7 +759,11 @@ make_metaword_with_depchar(struct splitt
   int len = mw ? mw->len : 0;
 
   /* metaword¤Îľ¸å¤Îʸ»ú¤Î¼ïÎà¤òÄ´¤Ù¤ë */
-  int type = anthy_get_xchar_type(*sc->ce[from + len].c);
+  int type;
+  if (sc->char_count <= from + len) {
+    return;
+  }
+  type = anthy_get_xchar_type(*sc->ce[from + len].c);
   if (!(type & XCT_SYMBOL) &&
       !(type & XCT_PART)) {
     return;


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/anthy/F-8/.cvsignore,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- .cvsignore	29 Oct 2007 10:25:07 -0000	1.30
+++ .cvsignore	27 Jun 2008 11:15:24 -0000	1.31
@@ -34,3 +34,4 @@
 alt-cannadic-070805.tar.bz2
 anthy-9100b.tar.gz
 anthy-9100d.tar.gz
+anthy-9100e.tar.gz


Index: anthy.spec
===================================================================
RCS file: /cvs/pkgs/rpms/anthy/F-8/anthy.spec,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- anthy.spec	29 Oct 2007 10:25:07 -0000	1.45
+++ anthy.spec	27 Jun 2008 11:15:24 -0000	1.46
@@ -1,8 +1,6 @@
-%define		altcannadicver	070805
-
 Name:		anthy
-Version:	9100d
-Release:	1%{?dist}
+Version:	9100e
+Release:	3%{?dist}
 # The entire source code is LGPLv2+ and dictionaries is GPLv2.
 License:	LGPLv2+ and GPLv2
 URL:		http://sourceforge.jp/projects/anthy/
@@ -11,9 +9,9 @@
 BuildRequires:	emacs
 BuildRequires:	xemacs
 
-Source0:	http://prdownloads.sourceforge.jp/anthy/27771/anthy-%{version}.tar.gz
+Source0:	http://prdownloads.sourceforge.jp/anthy/29142/anthy-%{version}.tar.gz
 Source1:	anthy-init.el
-#Source2:	http://prdownloads.sourceforge.jp/alt-cannadic/26595/alt-cannadic-%{altcannadicver}.tar.bz2
+Patch0:		anthy-9100e-fix-segfault-vu.patch
 
 Summary:	Japanese character set input library
 Group:		System Environment/Libraries
@@ -53,6 +51,7 @@
 
 %prep
 %setup -q #-a 2
+%patch0 -p1 -b 0-vu
 #cp alt-cannadic-%{altcannadicver}/* alt-cannadic/
 
 %build
@@ -115,6 +114,15 @@
 %{_datadir}/xemacs/site-packages/lisp/site-start.d/anthy-init.el
 
 %changelog
+* Fri Jun 27 2008 Akira TAGOH <tagoh at redhat.com> - 9100e-3
+- Fix a segfault with some words containing vu. (#452779)
+
+* Tue Feb 12 2008 Akira TAGOH <tagoh at redhat.com> - 9100e-2
+- Rebuild for gcc-4.3.
+
+* Tue Jan 29 2008 Akira TAGOH <tagoh at redhat.com> - 9100e-1
+- New upstream release.
+
 * Mon Oct 29 2007 Akira TAGOH <tagoh at redhat.com> - 9100d-1
 - New upstream release.
 - anthy-enable-dict-gtankan.patch: removed. no need to be applied anymore.


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/anthy/F-8/sources,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- sources	29 Oct 2007 10:25:07 -0000	1.31
+++ sources	27 Jun 2008 11:15:24 -0000	1.32
@@ -1 +1 @@
-4f629d34034de402c3fb647713bdb0ad  anthy-9100d.tar.gz
+1c328986005e61f503adc118909e12ac  anthy-9100e.tar.gz




More information about the fedora-extras-commits mailing list