1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-03 01:23:49 +00:00
freebsd-ports/ftp/spegla/files/patch-e_err.c
Jun Kuriyama 28faf0cb19 Fix \0 termination at %s substitution for configfile.
Be sure vsnprintf() may return value which is larger than buffer length.

Approved by:	maintainer
2001-02-01 08:33:04 +00:00

11 lines
204 B
C

--- 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;