mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-03 01:23:49 +00:00
28faf0cb19
Be sure vsnprintf() may return value which is larger than buffer length. Approved by: maintainer
11 lines
204 B
C
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;
|
|
|