aboutsummaryrefslogtreecommitdiffstats
path: root/ftp/spegla/files
diff options
context:
space:
mode:
authorkuriyama <kuriyama@FreeBSD.org>2001-02-01 16:33:04 +0800
committerkuriyama <kuriyama@FreeBSD.org>2001-02-01 16:33:04 +0800
commitb895dbbc9c5909ef44bf66dba358753d5d87607b (patch)
tree69b97590a2df94aa1ba03f1e233a9f9059a372b4 /ftp/spegla/files
parentd4de456bf5a8b51d6ed32c8e5c2e8d0a3bc99877 (diff)
downloadfreebsd-ports-gnome-b895dbbc9c5909ef44bf66dba358753d5d87607b.tar.gz
freebsd-ports-gnome-b895dbbc9c5909ef44bf66dba358753d5d87607b.tar.zst
freebsd-ports-gnome-b895dbbc9c5909ef44bf66dba358753d5d87607b.zip
Fix \0 termination at %s substitution for configfile.
Be sure vsnprintf() may return value which is larger than buffer length. Approved by: maintainer
Diffstat (limited to 'ftp/spegla/files')
-rw-r--r--ftp/spegla/files/patch-e_err.c10
-rw-r--r--ftp/spegla/files/patch-spegla.c10
2 files changed, 19 insertions, 1 deletions
diff --git a/ftp/spegla/files/patch-e_err.c b/ftp/spegla/files/patch-e_err.c
new file mode 100644
index 000000000000..f75ebc1b81c0
--- /dev/null
+++ b/ftp/spegla/files/patch-e_err.c
@@ -0,0 +1,10 @@
+--- e_err.c.orig Sun May 14 23:39:39 2000
++++ e_err.c Thu Feb 1 15:38:37 2001
+@@ -115,6 +115,7 @@
+ }
+
+ res = vsnprintf(p, len, fmt, args);
++ if (res >= len) res = len - 1;
+ len -= res;
+ p += res;
+
diff --git a/ftp/spegla/files/patch-spegla.c b/ftp/spegla/files/patch-spegla.c
index 2af5159fbf9c..a0a7f2af1c5c 100644
--- a/ftp/spegla/files/patch-spegla.c
+++ b/ftp/spegla/files/patch-spegla.c
@@ -1,5 +1,5 @@
--- spegla.c.orig Sat May 27 22:38:14 2000
-+++ spegla.c Fri Jan 19 19:36:43 2001
++++ spegla.c Thu Feb 1 15:39:24 2001
@@ -728,7 +728,7 @@
#ifdef ULTRIX
if ((f.fd_req.bfreen * 1024) < minfree)
@@ -9,3 +9,11 @@
#endif
e_errx(1, "%s: Not enough space left", path);
+@@ -953,6 +953,7 @@
+ }
+ buf[i] = p[j];
+ }
++ buf[i] = '\0';
+ *val = buf;
+ ret:
+ if (show)