aboutsummaryrefslogtreecommitdiff
path: root/japanese/sj3-server
diff options
context:
space:
mode:
authorChris D. Faulhaber <jedgar@FreeBSD.org>2001-02-03 01:03:39 +0000
committerChris D. Faulhaber <jedgar@FreeBSD.org>2001-02-03 01:03:39 +0000
commit83eb7f87b72b5c0e2ef4d0376c647f2d71f20e58 (patch)
treea8b6bc1c23dd049845d9943fdb563641f015264c /japanese/sj3-server
parenteaaa6953f836ec5d54a43f180e184579ef8d6b14 (diff)
downloadports-83eb7f87b72b5c0e2ef4d0376c647f2d71f20e58.tar.gz
ports-83eb7f87b72b5c0e2ef4d0376c647f2d71f20e58.zip
Notes
Diffstat (limited to 'japanese/sj3-server')
-rw-r--r--japanese/sj3-server/files/patch-ai22
1 files changed, 22 insertions, 0 deletions
diff --git a/japanese/sj3-server/files/patch-ai b/japanese/sj3-server/files/patch-ai
new file mode 100644
index 000000000000..b2ed64a2b9c6
--- /dev/null
+++ b/japanese/sj3-server/files/patch-ai
@@ -0,0 +1,22 @@
+--- server/execute.c.orig Mon Apr 13 07:20:22 1998
++++ server/execute.c Fri Feb 2 19:47:07 2001
+@@ -105,7 +105,7 @@
+ i = strlen(dict_dir) + 1 + strlen(path) + 1;
+ if (i > sizeof(tmp)) return ERROR;
+
+- strcpy(tmp, path);
++ strlcpy(tmp, path, sizeof(tmp));
+ index = strtok(tmp, "/");
+ do {
+ if (!strcmp(index, "..")) return ERROR;
+@@ -118,9 +118,7 @@
+ return ERROR;
+ }
+ }
+- strcpy(tmp, dict_dir);
+- strcat(tmp, "/");
+- strcat(tmp, path);
++ snprintf(tmp, sizeof(tmp), "%s/%s", dict_dir, path);
+ strcpy(path, tmp);
+ return 0;
+ }