summaryrefslogtreecommitdiff
path: root/inputmethod/canna-lib
diff options
context:
space:
mode:
authoruebayasi <uebayasi@pkgsrc.org>2002-12-27 08:41:23 +0000
committeruebayasi <uebayasi@pkgsrc.org>2002-12-27 08:41:23 +0000
commitb4c24525c52d42e10aa098f5fbee59e78db4dd02 (patch)
tree8a0c17e4d1d6b564bd514b08eda569bba32b2fcd /inputmethod/canna-lib
parent2e18bd5cafb1098ad58af38055e9ed4240b98cb2 (diff)
downloadpkgsrc-b4c24525c52d42e10aa098f5fbee59e78db4dd02.tar.gz
Update Canna to 3.6p1.
Changes from 3.5b2 are: * Add -inet option not to allow TCP connections by default. * Fix a buffer overflow. (This fix was already incorpolated in Pkgsrc version.) * Improve dicionary. * Improve conversion engine. * Other bug fixes. Patch is made by Yoshifumi Hiramatsu. Tested by Toru Takamizu.
Diffstat (limited to 'inputmethod/canna-lib')
-rw-r--r--inputmethod/canna-lib/Makefile16
-rw-r--r--inputmethod/canna-lib/PLIST47
-rw-r--r--inputmethod/canna-lib/buildlink2.mk4
-rw-r--r--inputmethod/canna-lib/distinfo24
-rw-r--r--inputmethod/canna-lib/patches/patch-aa86
-rw-r--r--inputmethod/canna-lib/patches/patch-ab15
-rw-r--r--inputmethod/canna-lib/patches/patch-ad35
-rw-r--r--inputmethod/canna-lib/patches/patch-ae234
-rw-r--r--inputmethod/canna-lib/patches/patch-ag360
-rw-r--r--inputmethod/canna-lib/patches/patch-ah26
-rw-r--r--inputmethod/canna-lib/patches/patch-ai33
11 files changed, 135 insertions, 745 deletions
diff --git a/inputmethod/canna-lib/Makefile b/inputmethod/canna-lib/Makefile
index 0914c84c1e0..68b17cc4aae 100644
--- a/inputmethod/canna-lib/Makefile
+++ b/inputmethod/canna-lib/Makefile
@@ -1,19 +1,13 @@
-# $NetBSD: Makefile,v 1.4 2002/08/25 19:22:55 jlam Exp $
+# $NetBSD: Makefile,v 1.5 2002/12/27 08:41:24 uebayasi Exp $
#
-DISTNAME= Canna35b2
-PKGNAME= Canna-lib-3.5.2
-PKGREVISION= 2
+DISTNAME= Canna36p1
+PKGNAME= Canna-lib-3.6.1
CATEGORIES= japanese inputmethod
-MASTER_SITES= ftp://ftp.nec.co.jp/pub/Canna/Canna35/
-
-PATCH_SITES= http://www.jaist.ac.jp/~fujieda/canna/
-PATCHFILES= Canna35b2-unoff1.patch.gz Canna35b2-unoff2.patch.gz \
- Canna35b2-hack1.patch.gz
-PATCH_DIST_STRIP= -p1
+MASTER_SITES= http://downloads.sourceforge.jp/canna/1722/
MAINTAINER= tech-pkg-ja@jp.netbsd.org
-HOMEPAGE= http://www.nec.co.jp/japanese/product/computer/soft/canna/
+HOMEPAGE= http://canna.sourceforge.jp/
COMMENT= Kana-Kanji conversion system (library)
INSTALL_TARGET= install install.man
diff --git a/inputmethod/canna-lib/PLIST b/inputmethod/canna-lib/PLIST
index 7ca1aada58d..bde54161726 100644
--- a/inputmethod/canna-lib/PLIST
+++ b/inputmethod/canna-lib/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2002/08/25 19:22:55 jlam Exp $
+@comment $NetBSD: PLIST,v 1.5 2002/12/27 08:41:24 uebayasi Exp $
include/canna/RK.h
include/canna/jrkanji.h
include/canna/keydef.h
@@ -19,6 +19,7 @@ lib/libcanna16.a
lib/libcanna16.so
lib/libcanna16.so.1
lib/libcanna16.so.1.0
+man/ja_JP.EUC/man3/RkBgnBun.3
man/ja_JP.EUC/man3/RkCloseRoma.3
man/ja_JP.EUC/man3/RkCvtEuc.3
man/ja_JP.EUC/man3/RkCvtHan.3
@@ -49,7 +50,6 @@ man/ja_JP.EUC/man3/RkOpenRoma.3
man/ja_JP.EUC/man3/RkPrev.3
man/ja_JP.EUC/man3/RkRemountDic.3
man/ja_JP.EUC/man3/RkResize.3
-man/ja_JP.EUC/man3/RkRgnBun.3
man/ja_JP.EUC/man3/RkRight.3
man/ja_JP.EUC/man3/RkShorten.3
man/ja_JP.EUC/man3/RkStoreYomi.3
@@ -61,6 +61,48 @@ man/ja_JP.EUC/man3/cannalib.3
man/ja_JP.EUC/man3/jrKanjiControl.3
man/ja_JP.EUC/man3/jrKanjiString.3
man/ja_JP.EUC/man3/uilib.3
+man/man3/RkBgnBun.3
+man/man3/RkCloseRoma.3
+man/man3/RkCvtEuc.3
+man/man3/RkCvtHan.3
+man/man3/RkCvtHira.3
+man/man3/RkCvtKana.3
+man/man3/RkCvtRoma.3
+man/man3/RkCvtZen.3
+man/man3/RkDefineDic.3
+man/man3/RkDeleteDic.3
+man/man3/RkEndBun.3
+man/man3/RkEnlarge.3
+man/man3/RkFinalize.3
+man/man3/RkGetDicList.3
+man/man3/RkGetKanji.3
+man/man3/RkGetLex.3
+man/man3/RkGetStat.3
+man/man3/RkGetYomi.3
+man/man3/RkGoto.3
+man/man3/RkInitialize.3
+man/man3/RkIntro.3
+man/man3/RkLeft.3
+man/man3/RkMapPhonogram.3
+man/man3/RkMapRoma.3
+man/man3/RkMountD.3
+man/man3/RkNext.3
+man/man3/RkNfer.3
+man/man3/RkOpenRoma.3
+man/man3/RkPrev.3
+man/man3/RkRemountDic.3
+man/man3/RkResize.3
+man/man3/RkRight.3
+man/man3/RkShorten.3
+man/man3/RkStoreYomi.3
+man/man3/RkUnmountDic.3
+man/man3/RkXfer.3
+man/man3/XKanjiControl.3
+man/man3/XLookupKanjiString.3
+man/man3/cannalib.3
+man/man3/jrKanjiControl.3
+man/man3/jrKanjiString.3
+man/man3/uilib.3
share/canna/default.canna
share/canna/dic/default.cbp
share/canna/dic/english.cbp
@@ -90,7 +132,6 @@ share/canna/dic/sokuon.cbp
share/canna/dic/tut.cbp
share/canna/dic/vje.cbp
share/canna/dic/wx2+.cbp
-share/canna/engine.cf
share/canna/sample/1.1.canna
share/canna/sample/1.2.canna
share/canna/sample/default.canna
diff --git a/inputmethod/canna-lib/buildlink2.mk b/inputmethod/canna-lib/buildlink2.mk
index e2c72bc3bc7..451b7f28188 100644
--- a/inputmethod/canna-lib/buildlink2.mk
+++ b/inputmethod/canna-lib/buildlink2.mk
@@ -1,10 +1,10 @@
-# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 19:22:55 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.3 2002/12/27 08:41:24 uebayasi Exp $
.if !defined(CANNA_BUILDLINK2_MK)
CANNA_BUILDLINK2_MK= # defined
BUILDLINK_PACKAGES+= canna
-BUILDLINK_DEPENDS.canna?= Canna-lib>=3.5.2
+BUILDLINK_DEPENDS.canna?= Canna-lib>=3.6.1
BUILDLINK_PKGSRCDIR.canna?= ../../inputmethod/canna-lib
EVAL_PREFIX+= BUILDLINK_PREFIX.canna=canna-lib
diff --git a/inputmethod/canna-lib/distinfo b/inputmethod/canna-lib/distinfo
index c7abfa069ee..c68bb116f74 100644
--- a/inputmethod/canna-lib/distinfo
+++ b/inputmethod/canna-lib/distinfo
@@ -1,21 +1,9 @@
-$NetBSD: distinfo,v 1.4 2002/12/02 03:40:20 itojun Exp $
+$NetBSD: distinfo,v 1.5 2002/12/27 08:41:24 uebayasi Exp $
-SHA1 (Uum4.109.tar.gz) = 9d57fa67fc321c0b1101970b02154b5d6e42e88e
-Size (Uum4.109.tar.gz) = 43738 bytes
-SHA1 (Canna35b2.tar.gz) = 66742205272cbc6bd91f272596381f761feac0a2
-Size (Canna35b2.tar.gz) = 1333329 bytes
-SHA1 (Canna35b2-unoff1.patch.gz) = 19579591190f7ace7d3ec5f61a7d01ca3bc576c1
-Size (Canna35b2-unoff1.patch.gz) = 21443 bytes
-SHA1 (Canna35b2-unoff2.patch.gz) = 16d578ed0558a632832194fffad8fcf24c9181fb
-Size (Canna35b2-unoff2.patch.gz) = 11375 bytes
-SHA1 (Canna35b2-hack1.patch.gz) = 24ab2baf104ef9748f92bd5315d4100a7ee961ab
-Size (Canna35b2-hack1.patch.gz) = 8384 bytes
-SHA1 (patch-aa) = 45cdfd8107ee0beeae878c9940273fc6bca0385a
-SHA1 (patch-ab) = 38f3ad4e022299a4dfd8d9391b1742b0d0f02a71
+SHA1 (Canna36p1.tar.gz) = 3e08fc03e16298ad7941a923989ea35929cdf3ba
+Size (Canna36p1.tar.gz) = 1337483 bytes
+SHA1 (patch-aa) = 816a5fddac06c980eaa7f622b6872231741c76a5
+SHA1 (patch-ab) = b203ad0cb1285ffed0037e0eced3ae298bec5eb9
SHA1 (patch-ac) = 8f9f999eb8abd9c8e3d3e5c66cf55150ce700919
-SHA1 (patch-ad) = dd2eb94e75dc4789e298aa1601280d32fbe5ec96
-SHA1 (patch-ae) = e44c60ddf1e042ab5df1457b6723071c38baae02
+SHA1 (patch-ad) = d4b5720c206f81124e0d53e71590de86f66c524c
SHA1 (patch-af) = 2700fc8395895176c16562af66ea5bf0b13d4e10
-SHA1 (patch-ag) = 5436f27d2f5fff1d317d58b3beeb1233d801ef32
-SHA1 (patch-ah) = eee6fc00787dbb59fd7571ba09cbed28c5c18e9c
-SHA1 (patch-ai) = 77cc19926b80f503c9b5171e10722ed0a492dec4
diff --git a/inputmethod/canna-lib/patches/patch-aa b/inputmethod/canna-lib/patches/patch-aa
index 0bac4477838..b4fba87ebc2 100644
--- a/inputmethod/canna-lib/patches/patch-aa
+++ b/inputmethod/canna-lib/patches/patch-aa
@@ -1,31 +1,35 @@
-$NetBSD: patch-aa,v 1.3 2002/08/25 19:22:55 jlam Exp $
-
---- Canna.conf- Fri Dec 1 00:31:14 2000
-+++ Canna.conf Fri Dec 1 00:31:36 2000
-@@ -130,10 +130,14 @@
+$NetBSD: patch-aa,v 1.4 2002/12/27 08:41:24 uebayasi Exp $
+--- Canna.conf.orig Thu Dec 5 22:25:03 2002
++++ Canna.conf Thu Dec 5 22:51:29 2002
+@@ -132,11 +132,11 @@
--cannaBinDir = /usr/local/canna/bin
--cannaSrvDir = /usr/local/canna/bin
--cannaLibDir = /usr/local/canna/lib
--cannaManDir = /usr/local/canna/man
--cannaIncDir = /usr/local/canna/include/canna
+ /* rootにならずにインストールする時はこれを定義して下さい */
+ /* #define InstallAsUser */
+-cannaPrefix = /usr/local/canna
++cannaPrefix = ${PREFIX}
+ cannaExecPrefix = $(cannaPrefix)
+ cannaBinDir = $(cannaExecPrefix)/bin
+-cannaSrvDir = $(cannaExecPrefix)/bin
+-cannaLibDir = $(cannaPrefix)/lib
++cannaSrvDir = $(cannaExecPrefix)/sbin
++cannaLibDir = $(cannaPrefix)/share/canna
+ cannaManDir = $(cannaPrefix)/man
+ cannaIncDir = $(cannaPrefix)/include/canna
+
+@@ -144,17 +144,19 @@
+ libCannaDir = $(cannaExecPrefix)/lib
+ ErrDir = $(cannaExecPrefix)/log
+ #else
-libCannaDir = /usr/lib
--
-ErrDir = /usr/spool/canna
-+cannaBinDir = ${PREFIX}/bin
-+cannaSrvDir = ${PREFIX}/sbin
-+cannaLibDir = ${PREFIX}/share/canna
-+cannaManDir = ${PREFIX}/man/ja_JP.EUC
-+cannaIncDir = ${PREFIX}/include/canna
-+libCannaDir = ${PREFIX}/lib
-+
++libCannaDir = $(cannaPrefix)/lib
+ErrDir = ${CANNA_SPOOL}
-+
-+/* INET6 related stuff */
-+INET6_DEFS = ${INET6}
-+INET6_LIBS = #-L/usr/local/v6/lib -linet6
+ #endif
-@@ -141,6 +145,6 @@
++INET6_DEFS = ${INET6}
++
+ /* 次の3行は変更しないでください */
+ wcharDefinition = -DCANNA_WCHAR
Wlib =
-JapaneseLocale = japanese
+JapaneseLocale = ja_JP.eucJP
@@ -35,20 +39,29 @@ $NetBSD: patch-aa,v 1.3 2002/08/25 19:22:55 jlam Exp $
+cannaOwner = ${CANNAOWNER}
+cannaGroup = ${CANNAGROUP}
-@@ -150,3 +154,3 @@
+ #ifdef InstallAsUser
+ cannaOwnerGroup =
+@@ -164,7 +166,7 @@
+
+ pointerIntegerDef =
-cannaDsoRev = 1
+cannaDsoRev = 1.0
/* SunOS 4.x をお使いの方で shared object を利用する場合には
-@@ -203,6 +207,5 @@
+ cannaDsoRev = 1.1
+ と指定してください。また、FreeBSD を利用する場合は、
+@@ -229,7 +231,7 @@
+ * コマンド類をリンクする時は、次を YES にしてくだい。
*/
--/* #define UseInstalledLibCanna YES */
+ /* #define UseInstalledLibCanna YES */
-#define UseInstalledLibCanna NO
+#define UseInstalledLibCanna YES
DicDir = $(cannaLibDir)/dic
-@@ -241,14 +244,14 @@
+@@ -274,18 +276,18 @@
+ DEPCANNALIB = $(libCannaDir)/libcanna.a
+ #endif
# endif
- CANNALIB = -L$(libCannaDir) -lcanna $(DLLIB)
+ CANNALIB = -Wl,-rpath,$(libCannaDir) -L$(libCannaDir) -lcanna $(DLLIB)
@@ -68,7 +81,11 @@ $NetBSD: patch-aa,v 1.3 2002/08/25 19:22:55 jlam Exp $
- CANNALIB = -L$(CANNASRC) -lcanna $(DLLIB)
+ CANNALIB = -Wl,-rpath,$(libCannaDir) -L$(libCannaDir) -lcanna $(DLLIB)
#endif /* UseInstalledLibCanna */
-@@ -261,10 +264,10 @@
+
+ #if UseInstalledLibCanna
+@@ -294,14 +296,14 @@
+ # else
+ DEPCANNALIB16 = $(libCannaDir)/libcanna16.a
# endif
- CANNALIB16 = -L$(libCannaDir) -lcanna16 $(DLLIB)
+ CANNALIB16 = -Wl,-rpath,$(libCannaDir) -L$(libCannaDir) -lcanna16 $(DLLIB)
@@ -81,5 +98,16 @@ $NetBSD: patch-aa,v 1.3 2002/08/25 19:22:55 jlam Exp $
+ DEPCANNALIB16 = $(libCannaDir)/libcanna16.a
# endif
- CANNALIB16 = -L$(CANNASRC) -lcanna16 $(DLLIB)
-+ CANNALIB16 = -Wl,-rpath,$(libCannaDir) -L$(libCannaDir) -lcanna16 $(DLLIB)
++ CANNALIB16 = -L$(libCannaDir) -lcanna16 $(DLLIB)
#endif /* UseInstalledLibCanna */
+
+ /*
+@@ -318,7 +320,7 @@
+ SCRIPTS_DEFINES =
+
+ #ifdef JAPANESEMAN
+-JMNLOCALE = ja
++JMNLOCALE = ja_JP.EUC
+ #endif
+
+ /* USE_OBSOLETE_STYLE_FILENAME を定義するための定義 */
diff --git a/inputmethod/canna-lib/patches/patch-ab b/inputmethod/canna-lib/patches/patch-ab
index db67743b3e6..70697472001 100644
--- a/inputmethod/canna-lib/patches/patch-ab
+++ b/inputmethod/canna-lib/patches/patch-ab
@@ -1,18 +1,21 @@
-$NetBSD: patch-ab,v 1.3 2002/08/25 19:22:56 jlam Exp $
-
---- ./Imakefile.orig Wed Nov 27 16:01:34 1996
-+++ ./Imakefile Fri Jul 30 19:17:44 1999
-@@ -61,5 +61,5 @@
+$NetBSD: patch-ab,v 1.4 2002/12/27 08:41:24 uebayasi Exp $
+--- Imakefile.orig Thu Dec 5 22:39:41 2002
++++ Imakefile Thu Dec 5 22:40:03 2002
+@@ -60,7 +60,7 @@
+ for i in $(SERVERDIR) ;\
do \
(cd $$i ; echo "installing" "in $(CURRENT_DIR)/$$i..."; \
- $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install); \
+ $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install install.man); \
done
-@@ -69,5 +69,5 @@
+ instclient::
+@@ -68,7 +68,7 @@
+ for i in $(CLIENTDIR) ;\
do \
(cd $$i ; echo "installing" "in $(CURRENT_DIR)/$$i..."; \
- $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install); \
+ $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install install.man); \
done
+ instsgs::
diff --git a/inputmethod/canna-lib/patches/patch-ad b/inputmethod/canna-lib/patches/patch-ad
index d626848cd63..ef10a2b7ed1 100644
--- a/inputmethod/canna-lib/patches/patch-ad
+++ b/inputmethod/canna-lib/patches/patch-ad
@@ -1,23 +1,12 @@
-$NetBSD: patch-ad,v 1.3 2002/08/25 19:22:56 jlam Exp $
---- server/misc.c~ Fri Jul 29 12:03:54 1994
-+++ server/misc.c Fri Jun 30 10:16:39 2000
-@@ -788,12 +788,19 @@
-
- if (client->username && client->username[0]) {
- if (client->groupname && client->groupname[0]) {
-+ if (strlen(DDUSER) + strlen(client->username) +
-+ strlen(DDGROUP) + strlen(client->groupname) +
-+ strlen(DDPATH) + 4 >= 256)
-+ return ( -1 );
- sprintf(dichome, "%s/%s:%s/%s:%s",
- DDUSER, client->username,
- DDGROUP, client->groupname,
- DDPATH);
- }
- else {
-+ if (strlen(DDUSER) + strlen(client->username) +
-+ strlen(DDPATH) + 2 >= 256)
-+ return ( -1 );
- sprintf(dichome, "%s/%s:%s",
- DDUSER, client->username,
- DDPATH);
+$NetBSD: patch-ad,v 1.4 2002/12/27 08:41:24 uebayasi Exp $
+--- dic/ideo/pubdic/Imakefile.orig Thu Dec 5 23:43:40 2002
++++ dic/ideo/pubdic/Imakefile Thu Dec 5 23:43:52 2002
+@@ -9,7 +9,7 @@
+ CANNAROOT = ../../..
+ CANNACMDDIR = $(CANNAROOT)/cmd
+ MERGE = $(CANNACMDDIR)/mergewd/mergeword
+- INCLUDES = -I$(CANNAROOT)/include
++ INCLUDES = -I$(CANNAROOT)/canna
+ #endif
+ TARGETS = iroha.t
+ PUBDICS = a.p k.p s.p t.p n.p h.p m.p y.p r.p w.p x.p
diff --git a/inputmethod/canna-lib/patches/patch-ae b/inputmethod/canna-lib/patches/patch-ae
deleted file mode 100644
index 5763ca872b0..00000000000
--- a/inputmethod/canna-lib/patches/patch-ae
+++ /dev/null
@@ -1,234 +0,0 @@
-$NetBSD: patch-ae,v 1.3 2002/08/25 19:22:56 jlam Exp $
-
-PATCH_SITES+= http://apps.v6.linux.or.jp/pub/Linux/IPv6-2/canna/
-PATCHFILES+= Canna35b2-v6-20000602.diff.gz
-PATCH_DIST_STRIP= -p1
-(copied here for as the above patch does not apply cleanly
-
-diff -ru lib/RKC/Imakefile lib/RKC/Imakefile
---- lib/RKC/Imakefile Tue Oct 22 21:26:34 1996
-+++ lib/RKC/Imakefile Fri Jun 2 15:11:31 2000
-@@ -11,7 +11,7 @@
- LINTLIBS = ../RK/llib-lRK.ln
- INCLUDES = -I$(CANNAROOT)/include
-
-- DEFINES = $(SIGNAL_DEFINES) $(RKC_DEFINES) $(ENGINE_DEFS)
-+ DEFINES = $(SIGNAL_DEFINES) $(RKC_DEFINES) $(ENGINE_DEFS) $(INET6_DEFS)
-
- HEADER = rkc.h rkcw.h
- OBJS = rkc.o convert.o wconvert.o wutil.o
-diff -ru lib/RKC/wconvert.c lib/RKC/wconvert.c
---- lib/RKC/wconvert.c Wed Nov 27 16:22:30 1996
-+++ lib/RKC/wconvert.c Fri Jun 2 15:01:34 2000
-@@ -368,13 +368,46 @@
- int number ;
- char *hostname ;
- {
-+#ifdef INET6
-+ struct addrinfo hints, *res0, *res;
-+ struct servent *sp ;
-+ char servbuf[NI_MAXSERV];
-+#else
- struct sockaddr_in inaddr; /* INET socket address. */
- unsigned long hostinetaddr; /* result of inet_addr of arpa addr */
- struct hostent *host_ptr, workhostbuf ;
- struct servent *sp ;
- int addrlen ;
- char *h_addr_ptr;
-+#endif
-
-+#ifdef INET6
-+ sp = getservbyname( IR_SERVICE_NAME, "tcp");
-+ sprintf(servbuf, "%u", (sp ? ntohs(sp->s_port) : IR_DEFAULT_PORT) + number);
-+ memset( &hints, 0, sizeof( hints ) );
-+ hints.ai_family = PF_UNSPEC;
-+ hints.ai_socktype = SOCK_STREAM;
-+ if ( getaddrinfo( hostname, servbuf, &hints, &res0 ) ){
-+ errno = EINVAL;
-+ return( -1 );
-+ }
-+ for( res = res0 ; res ; res = res->ai_next ){
-+ if( res->ai_family != PF_INET && res->ai_family != PF_INET6 )
-+ continue;
-+ if( (ServerFD = socket( res->ai_family, res->ai_socktype, res->ai_protocol )) < 0 )
-+ continue;
-+ errno = 0;
-+ if( connect( ServerFD, res->ai_addr, res->ai_addrlen ) ){
-+#ifdef nodef
-+ perror("connect");
-+#endif
-+ close( ServerFD ) ;
-+ ServerFD = -1;
-+ continue;
-+ }
-+ }
-+ freeaddrinfo( res0 );
-+#else /* INET6 / !INET6 */
- /* インターネットドメインで接続する。 */
- if( (host_ptr = gethostbyname( hostname ) )
- == (struct hostent *)NULL) {
-@@ -423,8 +456,10 @@
- perror("connect") ;
- #endif
- close( ServerFD ) ;
-+ ServerFD = -1;
- return( -1 ) ;
- }
-+#endif /* !INET6 */
- return( ServerFD ) ;
- }
- #endif
-diff -ru server/Imakefile server/Imakefile
---- server/Imakefile Wed Nov 27 16:25:24 1996
-+++ server/Imakefile Fri Jun 2 14:52:47 2000
-@@ -5,12 +5,12 @@
- INSTUGIDFLAGS = -m 6555 $(cannaOwnerGroup)
- #ifdef __EMX__
- INSTFLAGS = $(INSTUGIDFLAGS)
-- LOCAL_LIBRARIES = $(CANNAROOT)/lib/RK/RK.a
-+ LOCAL_LIBRARIES = $(CANNAROOT)/lib/RK/RK.a $(INET6_LIBS)
- #else
- INSTFLAGS = -s $(INSTUGIDFLAGS)
-- LOCAL_LIBRARIES = $(CANNAROOT)/lib/RK/libRK.a
-+ LOCAL_LIBRARIES = $(CANNAROOT)/lib/RK/libRK.a $(INET6_LIBS)
- #endif
-- DEFINES = $(CANNASERVER_DEFINES)
-+ DEFINES = $(CANNASERVER_DEFINES) $(INET6_DEFS)
- INCLUDES = -I$(CANNAROOT)/include
-
- IRSRCS = $(SRCS) $(HEADER)
-diff -ru server/connection.c server/connection.c
---- server/connection.c Wed Nov 27 16:26:10 1996
-+++ server/connection.c Fri Dec 1 11:52:10 2000
-@@ -133,2 +133,63 @@
- #ifdef USE_INET_SOCKET /* INETドメインの作成 */
-+#ifdef INET6
-+static int open_inet6_socket ()
-+{
-+ extern int PortNumberPlus;
-+ struct sockaddr_in6 in6sock;
-+ struct servent *sp;
-+ int retry, request;
-+
-+ /* /etc/servicesからポート番号を取得する */
-+ if( (sp = getservbyname(IR_SERVICE_NAME ,"tcp")) == NULL )
-+ {
-+ ir_debug( Dmsg(5,"Warning: Port number not find on '/etc/services'.\n");)
-+ ir_debug( Dmsg(5," Use %d as default.\n", IR_DEFAULT_PORT);)
-+ }
-+
-+ if ((request = socket (AF_INET6, SOCK_STREAM, 0)) < 0)
-+ {
-+ ir_debug( Dmsg(5,"Warning: INET socket for server failed.\n");)
-+ }
-+ else
-+ {
-+#ifdef SO_REUSEADDR
-+ {
-+ int one = 1;
-+ setsockopt(request, SOL_SOCKET, SO_REUSEADDR,
-+ (char *)&one, sizeof(int));
-+ }
-+#endif
-+ bzero ((char *)&in6sock, sizeof (in6sock));
-+ in6sock.sin6_family = AF_INET6;
-+ in6sock.sin6_port =
-+ (sp ? ntohs(sp->s_port) : IR_DEFAULT_PORT) + PortNumberPlus;
-+
-+ ir_debug( Dmsg(5, "ポート番号:[%d]\n",htons(in6sock.sin6_port));)
-+
-+ in6sock.sin6_port = htons(in6sock.sin6_port);
-+ in6sock.sin6_addr = in6addr_any;
-+
-+ retry = 0;
-+ while ( bind(request, (struct sockaddr *)&in6sock, sizeof(in6sock)) < 0 )
-+ {
-+ ir_debug( Dmsg(5, "bind トライ回数[%d]\n",retry);)
-+ if (++retry == 5){
-+ ir_debug( Dmsg(5,"Warning: Server could not bind.\n");)
-+ close(request);
-+ request = -1; /* bind 失敗 */
-+ break;
-+ }
-+ sleep (1);
-+ }
-+ if( retry != 5 ) {
-+ if (listen (request, 5)){
-+ ir_debug( Dmsg(5,"Warning: Server could not listen.\n");)
-+ close(request);
-+ request = -1; /* listen 失敗 */
-+ }
-+ }
-+ }
-+ return request;
-+}
-+#endif
- static int open_inet_socket ()
-@@ -200,2 +261,5 @@
- int request;
-+#if defined(USE_INET_SOCKET) && defined(INET6)
-+ int inet6_ok = 0;
-+#endif
-
-@@ -222,2 +286,14 @@
- #ifdef USE_INET_SOCKET /* INETドメイン */
-+#ifdef INET6
-+ if ((request = open_inet6_socket ()) != -1)
-+ {
-+ inet6_ok++;
-+ WellKnownConnections |= (1L << request);
-+ ir_debug( Dmsg(3,"INET6 domain socket is created\n"); )
-+ }
-+ else
-+ {
-+ ir_debug( Dmsg(5,"Warning: INET6 domain not created.\n");)
-+ }
-+#endif
- if ((request = open_inet_socket ()) != -1)
-@@ -229,3 +305,9 @@
- ir_debug( Dmsg(5,"Warning: INET domain not created.\n");)
-+#ifdef INET6
-+ if ( !inet6_ok ){
-+ return 0; /* 作成に失敗 */
-+ }
-+#else
- return 0; /* 作成に失敗 */
-+#endif
- }
-@@ -609,6 +691,11 @@
- {
-+#ifdef INET6
-+ struct sockaddr_storage from;
-+#else
- struct sockaddr_in from;
- struct hostent *hp;
-- char buf[MAXDATA], *inet_ntoa();
-- int fromlen = sizeof( struct sockaddr_in ) ;
-+ char *inet_ntoa();
-+#endif
-+ char buf[MAXDATA];
-+ int fromlen = sizeof(from);
-
-@@ -622,2 +709,15 @@
-
-+#ifdef INET6
-+#ifdef AF_UNIX
-+ if (from.ss_family != AF_UNIX)
-+#else
-+ if (from.ss_family != AF_LOCAL)
-+#endif
-+ {
-+ if (getnameinfo((struct sockaddr *)&from, fromlen, buf, sizeof(buf),
-+ NULL, 0, 0) != 0) {
-+ strcpy(buf, "invalid");
-+ }
-+ }
-+#else
- if( from.sin_family == AF_INET ) {
-@@ -630,3 +730,5 @@
- strncpy( buf, inet_ntoa( from.sin_addr ), MAXDATA-1 ) ;
-- } else {
-+ }
-+#endif
-+ else {
- client->hostaddr = IR_UNIX_ADDRESS;
diff --git a/inputmethod/canna-lib/patches/patch-ag b/inputmethod/canna-lib/patches/patch-ag
deleted file mode 100644
index 80704c72cb1..00000000000
--- a/inputmethod/canna-lib/patches/patch-ag
+++ /dev/null
@@ -1,360 +0,0 @@
-$NetBSD: patch-ag,v 1.1 2002/12/02 03:40:21 itojun Exp $
-
-security fix between 3.6 -> 3.6p1
-
---- server/wconvert.c.orig Wed Nov 27 16:27:28 1996
-+++ server/wconvert.c Sat Nov 9 10:38:45 2002
-@@ -100,6 +100,7 @@
- #endif
-
- extern void DispDebug() ;
-+extern const Ushort *ushortmemchr pro((const Ushort *, int, size_t));
- extern int canna_server_hi ;
- extern int canna_server_lo ;
- #ifdef DEBUG
-@@ -1322,7 +1323,10 @@
- char *dirname, *dirnamelong = (char *)0;
- int cxnum = Request.type18.context, stat = -1;
- int requestsize = Request.type18.size, retval;
-+ size_t datasize = Request.type18.datalen - SIZEOFSHORT * 2;
-
-+ if (datasize == 0 || req->data[datasize - 1] != 0)
-+ goto protoerr;
- if (validcontext(cxnum, client, wListDictionary)) {
- if (requestsize <= sizeof(local_buffer) ||
- (dicnames = malloc(requestsize))) {
-@@ -1359,6 +1363,7 @@
- }
- }
-
-+protoerr:
- retval = SendType6Reply(client, wListDictionary, EXTPROTO, stat,
- dicnames, namesize(dicnames, stat));
- if (dicnames != (char *)local_buffer) free(dicnames);
-@@ -1470,10 +1475,15 @@
- char *dicname, *dirname, *dirnamelong = (char *)0;
- int cxnum = Request.type18.context, stat = BADCONT;
- int dirlen, requestsize = Request.type18.size, retval;
-+ size_t datasize = Request.type18.datalen - SIZEOFSHORT * 2;
-
-+ if (datasize == 0 || req->data[datasize - 1] != 0)
-+ goto protoerr;
- if (validcontext(cxnum, client, wGetWordTextDictionary)) {
- dirname = req->data ;
- dirlen = strlen(dirname) + 1 ;
-+ if (dirlen == datasize)
-+ goto protoerr;
- dicname = &(req->data[dirlen]) ;
- if (dirlen > 1) {
- if (!dirname || dirname[0] != ':' ||
-@@ -1515,6 +1525,7 @@
- free(dirnamelong);
- }
- }
-+protoerr:
- retval = SendType7Reply(client, wGetWordTextDictionary, EXTPROTO,
- stat, stat > 0 ? stat + 1 : 0, infobuf);
- if (infobuf != (Ushort *)local_buffer) free((char *)infobuf);
-@@ -2296,6 +2307,9 @@
- {
- ir_debug( Dmsg(10, "ProcWideReq1 start!!\n") );
-
-+ if (Request.type1.datalen != 0)
-+ return( -1 );
-+
- return( 0 ) ;
- }
-
-@@ -2305,6 +2319,8 @@
- {
- ir_debug( Dmsg(10, "ProcWideReq2 start!!\n") );
-
-+ if (Request.type2.datalen != SIZEOFSHORT)
-+ return( -1 );
- buf += HEADER_SIZE; Request.type2.context = S2TOS(buf);
- ir_debug( Dmsg(10, "req->context =%d\n", Request.type2.context) );
-
-@@ -2317,6 +2333,8 @@
- {
- ir_debug( Dmsg(10, "ProcWideReq3 start!!\n") );
-
-+ if (Request.type3.datalen != SIZEOFSHORT * 2)
-+ return( -1 );
- buf += HEADER_SIZE; Request.type3.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type3.buflen = S2TOS(buf);
- ir_debug( Dmsg(10, "req->context =%d\n", Request.type3.context) );
-@@ -2334,12 +2352,18 @@
-
- ir_debug( Dmsg(10, "ProcWideReq4 start!!\n") );
-
-+ if (Request.type4.datalen < SIZEOFSHORT * 4)
-+ return( -1 );
- buf += HEADER_SIZE; Request.type4.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type4.begin = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type4.end = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type4.yomilen = S2TOS(buf);
- Request.type4.yomi = (Ushort *)(buf += SIZEOFSHORT) ;
-- len = Request.type4.datalen - SIZEOFSHORT * 4;
-+ len = Request.type4.yomilen + 1;
-+ if (Request.type4.datalen != SIZEOFSHORT * (4 + len)
-+ || len == 0
-+ || Request.type4.yomi[len - 1] != 0)
-+ return( -1 );
- for (data = Request.type4.yomi, i = 0; i < len; i++, data++)
- *data = ntohs((unsigned short)*data); /* ちょっとやだなあ */
- ir_debug( Dmsg(10, "req->context =%d\n", Request.type4.context) );
-@@ -2359,6 +2383,8 @@
- {
- ir_debug( Dmsg(10, "ProcWideReq5 start!!\n") );
-
-+ if (Request.type5.datalen != SIZEOFSHORT * 2 + SIZEOFINT)
-+ return( -1 );
- buf += HEADER_SIZE; Request.type5.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type5.size = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type5.mode = L4TOL(buf);
-@@ -2375,6 +2401,8 @@
- {
- ir_debug( Dmsg(10, "ProcWideReq6 start!!\n") );
-
-+ if (Request.type6.datalen != SIZEOFSHORT * 3)
-+ return( -1 );
- buf += HEADER_SIZE; Request.type6.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type6.number = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type6.buflen = S2TOS(buf);
-@@ -2391,6 +2419,8 @@
- {
- ir_debug( Dmsg(10, "ProcWideReq7 start!!\n") );
-
-+ if (Request.type7.datalen != SIZEOFSHORT * 3)
-+ return( -1 );
- buf += HEADER_SIZE; Request.type7.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type7.number = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type7.yomilen = (short)S2TOS(buf);
-@@ -2407,6 +2437,8 @@
- {
- ir_debug( Dmsg(10, "ProcWideReq8 start!!\n") );
-
-+ if (Request.type8.datalen != SIZEOFSHORT * 4)
-+ return( -1 );
- buf += HEADER_SIZE; Request.type8.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type8.curbun = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type8.curkouho = S2TOS(buf);
-@@ -2425,6 +2457,8 @@
- {
- ir_debug( Dmsg(10, "ProcWideReq9 start!!\n") );
-
-+ if (Request.type9.datalen != SIZEOFSHORT * 4)
-+ return( -1 );
- buf += HEADER_SIZE; Request.type9.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type9.number = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type9.kouho = S2TOS(buf);
-@@ -2442,9 +2476,13 @@
- BYTE *buf ;
- {
- register int i ;
-+ int rest;
-
- ir_debug( Dmsg(10, "ProcWideReq10 start!!\n") );
-
-+ rest = Request.type10.datalen - (SIZEOFSHORT * 2 + SIZEOFINT);
-+ if (rest < 0)
-+ return( -1 );
- buf += HEADER_SIZE; Request.type10.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type10.number = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type10.mode = L4TOL(buf);
-@@ -2452,6 +2490,8 @@
- ir_debug( Dmsg(10, "req->number =%d\n", Request.type10.number) );
- ir_debug( Dmsg(10, "req->mode =%d\n", Request.type10.mode) );
-
-+ if (rest != Request.type10.number * SIZEOFSHORT)
-+ return( -1 );
- buf += SIZEOFINT; Request.type10.kouho = (short *)buf; /* short? */
- for (i = 0; i < Request.type10.number; i++) {
- Request.type10.kouho[i] = S2TOS(buf); buf += SIZEOFSHORT;
-@@ -2468,12 +2508,18 @@
- register Ushort *data;
- int i, len ;
-
-- ir_debug( Dmsg(10, "ProcWideReq10 start!!\n") );
-+ ir_debug( Dmsg(10, "ProcWideReq11 start!!\n") );
-
-+ if (Request.type11.datalen < SIZEOFSHORT * 2)
-+ return( -1 );
- buf += HEADER_SIZE; Request.type11.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type11.curbun = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type11.yomi = (Ushort *)buf;
-+ if (Request.type11.datalen % SIZEOFSHORT != 0)
-+ return( -1 );
- len = ((int)Request.type11.datalen - SIZEOFSHORT * 2) / SIZEOFSHORT ;
-+ if (len == 0 || Request.type11.yomi[len - 1] != 0)
-+ return( -1 );
- for (data = Request.type11.yomi, i = 0; i < len; i++, data++)
- *data = ntohs( *data ); /* なんかやだ */
- ir_debug( Dmsg(10, "req->context =%d\n", Request.type11.context) );
-@@ -2490,16 +2536,26 @@
- BYTE *buf ;
- {
- register Ushort *data;
-- int i, len ;
-+ int i, len, rest ;
-
- ir_debug( Dmsg(10, "ProcWideReq12 start!!\n") );
-
-+ rest = Request.type12.datalen - SIZEOFSHORT;
-+ if (rest < 0)
-+ return( -1 );
- buf += HEADER_SIZE; Request.type12.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type12.datainfo = (Ushort *)buf;
-+ if (!ushortmemchr((Ushort *)buf, 0, rest / SIZEOFSHORT))
-+ return( -1 );
- len = ushortstrlen((Ushort *)buf) + 1;
-+ rest -= len * SIZEOFSHORT;
-+ if (rest <= 0)
-+ return( -1 );
- for( data = Request.type12.datainfo, i = 0; i < len; i++, data++ )
- *data = ntohs( *data ); /* なんかやだ */
- buf += len * SIZEOFSHORT;
-+ if (buf[rest - 1] != '\0')
-+ return( -1 );
- Request.type12.dicname = (char *)buf;
- ir_debug( Dmsg(10, "req->context =%d\n", Request.type12.context) );
- ir_debug( Dmsg(10, "req->datainfo =%s\n",
-@@ -2517,24 +2573,37 @@
- BYTE *buf ;
- {
- register Ushort *data;
-- int i ,len ;
-+ int i ,len, rest;
-
- ir_debug( Dmsg(10, "ProcWideReq13 start!!\n") );
-
-+ rest = Request.type13.datalen - SIZEOFSHORT;
-+ if (rest < 0)
-+ return( -1 );
- buf += HEADER_SIZE; Request.type13.context = S2TOS(buf);
- len = SIZEOFSHORT ;
- buf += len;
- Request.type13.dicname = (char *)buf;
-+ if (!memchr(buf, 0, rest))
-+ return( -1 );
- len = strlen( (char *)buf ) + 1;
-+ rest -= len;
-+ if (rest % SIZEOFSHORT
-+ || rest < SIZEOFSHORT * 3)
-+ return( -1 );
- buf += len;
- Request.type13.yomi = (Ushort *)buf;
- len = ((int)Request.type13.datalen - len - SIZEOFSHORT * 4) / SIZEOFSHORT;
-+ if (ushortmemchr((Ushort *)buf, 0, len) != (Ushort *)buf + len - 1)
-+ return( -1 );
- for( data = Request.type13.yomi, i = 0; i < len; i++, data++)
- *data = ntohs( *data );
-- buf += (ushortstrlen((Ushort *)buf) + 1) * SIZEOFSHORT;
-+ buf += len * SIZEOFSHORT;
- Request.type13.yomilen = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type13.kouhosize = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type13.hinshisize = S2TOS(buf);
-+ if (Request.type13.yomilen != len - 1)
-+ return( -1 );
- ir_debug( Dmsg(10, "req->context =%d\n", Request.type13.context) );
- ir_debug( Dmsg(10, "req->dicname =%s\n", Request.type13.dicname) );
- ir_debug( Dmsg(10, "req->yomi =%s\n",
-@@ -2556,11 +2625,16 @@
-
- ir_debug( Dmsg(10, "ProcWideReq14 start!!\n") );
-
-+ if (Request.type14.datalen <= SIZEOFINT + SIZEOFSHORT
-+ || Request.type14.datalen % SIZEOFSHORT)
-+ return( -1 );
- buf += HEADER_SIZE; Request.type14.mode = L4TOL(buf);
- buf += SIZEOFINT; Request.type14.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type14.yomi = (Ushort *)buf;
- len = ((int)Request.type14.datalen - SIZEOFSHORT - SIZEOFINT)
- / SIZEOFSHORT;
-+ if (Request.type14.yomi[len - 1] != 0)
-+ return( -1 );
- for (data = Request.type14.yomi, i = 0; i < len; i++, data++)
- *data = ntohs( *data ); /* なんかやだ */
-
-@@ -2577,11 +2651,17 @@
- ProcWideReq15(buf)
- BYTE *buf ;
- {
-+ int rest;
- ir_debug( Dmsg(10, "ProcWideReq15 start!!\n") );
-
-+ rest = Request.type15.datalen - (SIZEOFINT + SIZEOFSHORT);
-+ if (rest <= 0)
-+ return( -1 );
- buf += HEADER_SIZE; Request.type15.mode = L4TOL(buf);
- buf += SIZEOFINT; Request.type15.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type15.dicname = (char *)buf;
-+ if (buf[rest - 1] != 0)
-+ return( -1 );
- ir_debug( Dmsg(10, "req->mode =%d\n", Request.type15.mode) );
- ir_debug( Dmsg(10, "req->context =%d\n", Request.type15.context) );
- ir_debug( Dmsg(10, "req->dicname =%s\n",
-@@ -2597,6 +2677,9 @@
- ir_debug( Dmsg(10, "ProcWideReq17 start!!\n") );
-
- buf += HEADER_SIZE;
-+ if (Request.type17.datalen < SIZEOFCHAR * 2
-+ || buf[Request.type17.datalen - SIZEOFCHAR * 2] != 0)
-+ return( -1 );
- Request.type17.dicname = (char *)buf;
- Request.type17.mode = (char)*(buf + Request.type17.datalen - SIZEOFCHAR) ;
- ir_debug( Dmsg(10, "req->dicname =%s\n",
-@@ -2613,6 +2696,8 @@
- {
- ir_debug( Dmsg(10, "ProcWideReq18 start!!\n") );
-
-+ if (Request.type18.datalen < SIZEOFSHORT * 2)
-+ return( -1 );
- buf += HEADER_SIZE; Request.type18.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type18.data = (char *)buf;
- buf += Request.type18.datalen - SIZEOFSHORT * 2;
-@@ -2630,12 +2715,18 @@
- ProcWideReq19(buf)
- BYTE *buf ;
- {
-+ int rest;
- ir_debug( Dmsg(10, "ProcWideReq19 start!!\n") );
-
-+ rest = Request.type20.datalen - (SIZEOFSHORT + SIZEOFINT * 2);
-+ if (rest < 0)
-+ return( -1 );
- buf += HEADER_SIZE; Request.type20.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type20.command = L4TOL(buf);
- buf += SIZEOFINT; Request.type20.bufsize = L4TOL(buf);
- buf += SIZEOFINT; Request.type20.buf = (char *)buf;
-+ if (Request.type20.bufsize != rest)
-+ return( -1 );
- ir_debug( Dmsg(10, "req->context =%d\n", Request.type20.context) );
- ir_debug( Dmsg(10, "req->command =%d\n", Request.type20.command) );
- ir_debug( Dmsg(10, "req->bufsize =%d\n", Request.type20.bufsize) );
-@@ -2647,15 +2738,25 @@
- ProcWideReq20(buf)
- BYTE *buf ;
- {
-+ BYTE *bufend;
- ir_debug( Dmsg(10, "ProcWideReq20 start!!\n") );
-
-+ if (Request.type21.datalen < SIZEOFINT + SIZEOFSHORT)
-+ return( -1 );
- buf += HEADER_SIZE; Request.type21.mode = L4TOL(buf);
-+ bufend = buf + Request.type21.datalen;
- buf += SIZEOFINT; Request.type21.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type21.dirname = (char *)buf;
-+ if (!memchr(buf, 0, bufend - buf))
-+ return( -1 );
- buf += strlen((char *)buf) + 1;
- Request.type21.srcdic = (char *)buf;
-+ if (!memchr(buf, 0, bufend - buf))
-+ return( -1 );
- buf += strlen((char *)buf) + 1;
- Request.type21.dstdic = (char *)buf;
-+ if (*(bufend - 1) != 0)
-+ return( -1 );
-
- ir_debug( Dmsg(10, "req->mode =%d\n", Request.type21.mode) );
- ir_debug( Dmsg(10, "req->context =%d\n", Request.type21.context) );
diff --git a/inputmethod/canna-lib/patches/patch-ah b/inputmethod/canna-lib/patches/patch-ah
deleted file mode 100644
index f1d38c835d4..00000000000
--- a/inputmethod/canna-lib/patches/patch-ah
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-ah,v 1.1 2002/12/02 03:40:21 itojun Exp $
-
-security fix between 3.6 -> 3.6p1
-
---- server/util.c.orig Wed Nov 6 19:09:47 1996
-+++ server/util.c Sat Nov 9 10:39:17 2002
-@@ -217,6 +217,19 @@
- return res;
- }
-
-+const Ushort *
-+ushortmemchr(ws, ch, len)
-+const Ushort *ws;
-+int ch;
-+size_t len;
-+{
-+ const Ushort *p, *end;
-+ for (p = ws, end = ws + len; p < end; ++p)
-+ if (*p == (Ushort)ch)
-+ return p;
-+ return NULL;
-+}
-+
- int
- ushortstrcpy(wd, ws)
- Ushort *wd, *ws;
diff --git a/inputmethod/canna-lib/patches/patch-ai b/inputmethod/canna-lib/patches/patch-ai
deleted file mode 100644
index 154b178c42b..00000000000
--- a/inputmethod/canna-lib/patches/patch-ai
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-ai,v 1.1 2002/12/02 03:40:21 itojun Exp $
-
-security fix between 3.6 -> 3.6p1
-
---- server/convert.c.orig Mon Dec 2 20:01:34 1996
-+++ server/convert.c Sat Nov 9 10:39:32 2002
-@@ -53,6 +53,8 @@
- #define ACK2 2
- #define ACK3 3
- #define CHECK_ACK_BUF_SIZE (ACK_BUFSIZE + (SIZEOFLONG * 2) )
-+#define IR_INT_MAX 32767
-+#define IR_INT_INVAL(x) ((unsigned int)x > IR_INT_MAX)
-
- extern int errno;
-
-@@ -1778,6 +1780,8 @@
- return( needsize ) ;
-
- req->namelen = (int)L4TOL(buf + SIZE4);
-+ if( IR_INT_INVAL(req->namelen) )
-+ return( -1 );
- ir_debug( Dmsg(10,"req->namelen =%d\n", req->namelen ); )
-
- if( (needsize = SIZE8 + req->namelen - size) > 0 )
-@@ -1785,6 +1789,8 @@
-
- if( req->namelen > 0 ){
- req->name = buf + SIZE8 ;
-+ if( req->name[req->namelen - 1] != 0 )
-+ return( -1 );
- }
- ir_debug( Dmsg(10,"req->namelen =%d\n", req->namelen ); )
- ir_debug( Dmsg(10,"req->name =%s\n", req->name ); )