[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freewnn:00415] Re: about uum for jserver



 いいじま@LASER5 です。

From: Yabuki Youichi <yabuki@srapc1149.sra.co.jp>
> この部分はこれだとまずいので、青野さんが wnn-users 841 で
> 訂正版(Nov 11,1999 版)を出されてますよね。

 ご指摘ありがとうございます。手動パッチで当てた時、修正し忘れた
ようです。もう一度 juum2.1.patchとしてまとめたものを、添付し
なおしておきます。


-- 
 飯島賢吾 // E-Mail: iijima@laser5.co.jp
diff -Nurd FreeWnn-1.1.1-a017/Xsi/Wnn/Makefile.in FreeWnn-1.1.1-a017.fix/Xsi/Wnn/Makefile.in
--- FreeWnn-1.1.1-a017/Xsi/Wnn/Makefile.in	Sun Jan 30 13:32:01 2000
+++ FreeWnn-1.1.1-a017.fix/Xsi/Wnn/Makefile.in	Thu Jul 13 22:11:00 2000
@@ -53,7 +53,9 @@
 
 JLIBV3DIR = jlib.V3
 
-SUBDIRS = $(JDDIR) $(JSERVERDIR) $(JLIBDIR) $(WNNCLIENTSDIR) $(WNNJUTILDIR)         $(PUBDICPLUSDIR) $(WNNCONSDIR) $(WNNMANDIR) $(WNNENVDIR) $(JLIBV3DIR)
+UUMDIR = uum
+
+SUBDIRS = $(JDDIR) $(JSERVERDIR) $(JLIBDIR) $(WNNCLIENTSDIR) $(WNNJUTILDIR)         $(PUBDICPLUSDIR) $(WNNCONSDIR) $(WNNMANDIR) $(WNNENVDIR) $(JLIBV3DIR)          $(UUMDIR)
 
 install::
 	@for flag in ${MAKEFLAGS} ''; do \
diff -Nurd FreeWnn-1.1.1-a017/Xsi/Wnn/etc/msg.c FreeWnn-1.1.1-a017.fix/Xsi/Wnn/etc/msg.c
--- FreeWnn-1.1.1-a017/Xsi/Wnn/etc/msg.c	Thu Jul 13 21:47:13 2000
+++ FreeWnn-1.1.1-a017.fix/Xsi/Wnn/etc/msg.c	Thu Jul 13 22:11:00 2000
@@ -124,7 +124,11 @@
   if (lang == NULL || *lang == '\0')
     {
 #ifdef  HAS_SETLOCALE
+#ifdef linux
+      lang = setlocale (LC_ALL, "");
+#else
       lang = setlocale (LC_ALL, NULL);
+#endif
       if (lang == NULL || *lang == '\0')
 #endif
         {
diff -Nurd FreeWnn-1.1.1-a017/Xsi/Wnn/jlib/js.c FreeWnn-1.1.1-a017.fix/Xsi/Wnn/jlib/js.c
--- FreeWnn-1.1.1-a017/Xsi/Wnn/jlib/js.c	Fri Mar  3 00:32:39 2000
+++ FreeWnn-1.1.1-a017.fix/Xsi/Wnn/jlib/js.c	Thu Jul 13 22:11:00 2000
@@ -342,7 +342,10 @@
      char *pserver;
 {
   register char *p;
-  strcpy (pserver, server);
+  /* Workaround for pserver buffer overrun : Nov 11,1999 by T.Aono */
+  /* assumes pserver[64]. variable length string is not supported. */
+  strncpy(pserver, server, 64-1);
+  pserver[64-1] = '\0';
   p = pserver;
   for (; *p && *p != ':'; p++);
   if (!*p)
diff -Nurd FreeWnn-1.1.1-a017/Xsi/Wnn/uum/Makefile.in FreeWnn-1.1.1-a017.fix/Xsi/Wnn/uum/Makefile.in
--- FreeWnn-1.1.1-a017/Xsi/Wnn/uum/Makefile.in	Fri Jan 21 01:01:38 2000
+++ FreeWnn-1.1.1-a017.fix/Xsi/Wnn/uum/Makefile.in	Thu Jul 13 22:11:00 2000
@@ -37,7 +37,7 @@
        INCLUDES = -I$(WNNINCLUDESRC) -I$(WNNROMKANSRC)
         DEFINES = $(SIGNAL_DEFINES) $(WNNDEFINES) $(WNNLANGDEF)
 LOCAL_INSTFLAGS = $(INSTUIDFLAGS) -o $(UUMOWNER)
-LOCAL_LIBRARIES = $(WNNJLIB) $(WNNCONVLIB)
+LOCAL_LIBRARIES = $(WNNJLIB) $(WNNCONVLIB) @LIBS@
 
 SRC1= epilogue.c header.c kensaku.c kuten.c jis_in.c       prologue.c touroku.c jikouho.c jutil.c w_string.c       printf.c termio.c hinsi.c termcap.c       ttyfdslot.c setutmp.c redraw.c history.c key_bind.c       screen.c basic_op.c uif.c cursor.c jhlp.c       select_ele.c inspect.c wnnrc_op.c functions.c
 
diff -Nurd FreeWnn-1.1.1-a017/Xsi/Wnn/uum/jhlp.c FreeWnn-1.1.1-a017.fix/Xsi/Wnn/uum/jhlp.c
--- FreeWnn-1.1.1-a017/Xsi/Wnn/uum/jhlp.c	Thu Feb 24 01:08:49 2000
+++ FreeWnn-1.1.1-a017.fix/Xsi/Wnn/uum/jhlp.c	Thu Jul 13 22:11:00 2000
@@ -155,7 +155,8 @@
   strcpy (username, getpwuid (getuid ())->pw_name);
   if ((name = getenv (WNN_USERNAME_ENV)) != NULL)
     {
-      strcpy (username, name);
+      strncpy(username, name, PATHNAMELEN-1);
+      username[PATHNAMELEN-1] = '\0';
     }
   for (i = 1; i < argc;)
     {
@@ -163,7 +164,8 @@
         {
           if (i >= argc || argv[i][0] == '-')
             default_usage ();
-          strcpy (lang_dir, argv[i++]);
+          strncpy(lang_dir, argv[i++], 31);
+          lang_dir[31] = '\0';
           for (; i < argc; i++)
             {
               argv[i - 2] = argv[i];
@@ -180,8 +182,8 @@
         {
           if (strlen (p) >= 4)
             {
-              strncpy (lang_dir, p, 5);
-              lang_dir[5] = '\0';
+              strncpy (lang_dir, p, 31);
+              lang_dir[31] = '\0';
             }
           else
             {
@@ -237,8 +239,9 @@
         }
       if (name = getenv (server_env))
         {
-          strcpy (def_servername, name);
-          strcpy (def_reverse_servername, name);
+          strncpy(def_servername, name, PATHNAMELEN-1);
+          def_servername[PATHNAMELEN-1] = '\0';
+          strcpy(def_reverse_servername, def_servername);
         }
     }
 
@@ -539,7 +542,8 @@
 static int
 do_k_opt ()
 {
-  strcpy (uumkey_name_in_uumrc, optarg);
+  strncpy(uumkey_name_in_uumrc, optarg, PATHNAMELEN-1);
+  uumkey_name_in_uumrc[PATHNAMELEN-1] = '\0';
   if (*uumkey_name_in_uumrc == '\0')
     {
       return -1;
@@ -551,7 +555,8 @@
 static int
 do_c_opt ()
 {
-  strcpy (convkey_name_in_uumrc, optarg);
+  strncpy(convkey_name_in_uumrc, optarg, PATHNAMELEN-1);
+  convkey_name_in_uumrc[PATHNAMELEN-1] = '\0';
   if (*convkey_name_in_uumrc == '\0')
     {
       return -1;
@@ -563,7 +568,8 @@
 static int
 do_r_opt ()
 {
-  strcpy (rkfile_name_in_uumrc, optarg);
+  strncpy(rkfile_name_in_uumrc, optarg, PATHNAMELEN-1);
+  rkfile_name_in_uumrc[PATHNAMELEN-1] = '\0';
   if (*rkfile_name_in_uumrc == '\0')
     {
       return -1;
@@ -582,8 +588,9 @@
 static int
 do_D_opt ()
 {
-  strcpy (def_servername, optarg);
-  strcpy (def_reverse_servername, optarg);
+  strncpy(def_servername, optarg, PATHNAMELEN-1);
+  def_servername[PATHNAMELEN-1] = '\0';
+  strcpy(def_reverse_servername, def_servername);
   if (*def_servername == '\0')
     {
       return -1;
@@ -594,7 +601,8 @@
 static int
 do_n_opt ()
 {
-  strcpy (username, optarg);
+  strncpy(username, optarg, PATHNAMELEN-1);
+  username[PATHNAMELEN-1] = '\0';
   if (*username == '\0')
     {
       return -1;
@@ -638,7 +646,10 @@
 #ifdef  SYSVR2
 #define index   strchr
 #endif /* SYSVR2 */
+
+#if !defined(linux)
   extern char *index ();
+#endif
 
   strcpy (ostr, default_getoptstr);
   strcat (ostr, lang_db->getoptstr);
diff -Nurd FreeWnn-1.1.1-a017/Xsi/Wnn/uum/wnnrc_op.c FreeWnn-1.1.1-a017.fix/Xsi/Wnn/uum/wnnrc_op.c
--- FreeWnn-1.1.1-a017/Xsi/Wnn/uum/wnnrc_op.c	Thu Feb 24 00:31:45 2000
+++ FreeWnn-1.1.1-a017.fix/Xsi/Wnn/uum/wnnrc_op.c	Thu Jul 13 22:11:00 2000
@@ -132,7 +132,7 @@
   int noerr, expandsuc;
   struct passwd *u;
   extern struct passwd *getpwnam ();
-#if defined(SYSVR2) && !defined(AIXV3)
+#if defined(SYSVR2) && !defined(AIXV3) && !defined(linux)
   extern char *strchr ();
 #endif /* defined(SYSVR2) && !defined(AIXV3) */