summaryrefslogtreecommitdiffstats
path: root/sys/boot/common
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-08-08 20:53:04 +0000
committerdim <dim@FreeBSD.org>2011-08-08 20:53:04 +0000
commit47693a10b5ac1dea128585a5fe3ce3fa0645fb55 (patch)
treeb698ef27d849348c6c82044185aa842133a1f9b8 /sys/boot/common
parent974ceaefdb1a44dd2e13be1bb2f3457b221a224a (diff)
downloadFreeBSD-src-47693a10b5ac1dea128585a5fe3ce3fa0645fb55.zip
FreeBSD-src-47693a10b5ac1dea128585a5fe3ce3fa0645fb55.tar.gz
Fix buffer overflow in sys/boot/common/util.c's printf(), when printing
large (>= 10^10) numbers. In theory, 20 characaters should be enough, but bump the buffer to 32 characters, so we have some room for the future. Reviewed by: pjd Approved by: re (kib)
Diffstat (limited to 'sys/boot/common')
-rw-r--r--sys/boot/common/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/boot/common/util.c b/sys/boot/common/util.c
index 012106a..07f69a3 100644
--- a/sys/boot/common/util.c
+++ b/sys/boot/common/util.c
@@ -119,7 +119,7 @@ printf(const char *fmt, ...)
{
va_list ap;
const char *hex = "0123456789abcdef";
- char buf[10], *s;
+ char buf[32], *s;
unsigned long long u;
int c, l;
OpenPOWER on IntegriCloud