freebsd-ports/japanese/FreeWnn-server/files/patch-Wnn-jserver-initjserv.c
Hiroki Sato 36ede78e2d - Use RFC 2553 API for AF_INET[46] socket handling.
- Fix several potential buffer overflows.
- Add missing "listenaddr ::1" to cserverc.
- Add WITHOUT_INET6 handling.
2009-01-02 23:08:15 +00:00

52 lines
1.6 KiB
C

Index: Wnn/jserver/initjserv.c
===================================================================
RCS file: /home/cvs/private/hrs/freewnn/Wnn/jserver/initjserv.c,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-Wnn-jserver-initjserv.c,v 1.4 2009-01-02 23:08:15 hrs Exp $ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$Translation:.*\$ -I\$hrs:.*\$ -w -r1.1.1.1 -r1.3
--- Wnn/jserver/initjserv.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
+++ Wnn/jserver/initjserv.c 2 Jan 2009 11:46:51 -0000 1.3
@@ -154,6 +154,7 @@
char param[EXPAND_PATH_LENGTH +1];
char *word;
int i, num, *v[17];
+ int lindex = 0;
strcpy (jserver_dir, JSERVER_DIR);
@@ -215,6 +216,15 @@
}
log_debug ("max_client=%d", max_client);
}
+ else if (listenaddr[lindex][0] == '\0'
+ && strcmp(code, "listenaddr") == 0) {
+ num = sscanf (data, "%s %s ", code, listenaddr[lindex]);
+ if (num != 2) {
+ log_err ("command %s invalid.", code);
+ continue;
+ }
+ lindex++;
+ }
else if (strcmp (code, "max_sticky_env") == 0)
{
num = sscanf (data, "%s %d ", code, &max_sticky_env);
@@ -305,7 +315,9 @@
}
fclose (fp);
+ /*
printf ("Finished Reading Files\n");
+ */
return (0);
}
@@ -340,7 +352,9 @@
files[fid].localf = LOCAL;
strcpy (files[fid].name, buffer);
+ /*
printf ("Reading %s\t Fid = %d\n", buffer, fid);
+ */
if (read_file (&files[fid]) == -1)
{
printf ("Error reading %s\n", buffer);