mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-29 21:39:24 +00:00
28faf0cb19
Be sure vsnprintf() may return value which is larger than buffer length. Approved by: maintainer
20 lines
415 B
C
20 lines
415 B
C
--- spegla.c.orig Sat May 27 22:38:14 2000
|
|
+++ spegla.c Thu Feb 1 15:39:24 2001
|
|
@@ -728,7 +728,7 @@
|
|
#ifdef ULTRIX
|
|
if ((f.fd_req.bfreen * 1024) < minfree)
|
|
#else
|
|
- if ((f.f_bsize * f.f_bavail) < minfree)
|
|
+ if (((long long)f.f_bsize * f.f_bavail) < minfree)
|
|
#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)
|