summaryrefslogtreecommitdiff
path: root/ftp/spegla/files/patch-e_err.c
diff options
context:
space:
mode:
authorJun Kuriyama <kuriyama@FreeBSD.org>2001-02-01 08:33:04 +0000
committerJun Kuriyama <kuriyama@FreeBSD.org>2001-02-01 08:33:04 +0000
commit28faf0cb193686b44ca7b83b2ce60ddae0c6a65a (patch)
treec84935298b7b9a4a016ca36bdb9fc8b020e01ffc /ftp/spegla/files/patch-e_err.c
parentUpgrade to 1.8.2. (diff)
Fix \0 termination at %s substitution for configfile.
Be sure vsnprintf() may return value which is larger than buffer length. Approved by: maintainer
Notes
Notes: svn path=/head/; revision=37868
Diffstat (limited to 'ftp/spegla/files/patch-e_err.c')
-rw-r--r--ftp/spegla/files/patch-e_err.c10
1 files changed, 10 insertions, 0 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;
+