svn commit: r224722 - head/sys/boot/common

Dimitry Andric dim at FreeBSD.org
Mon Aug 8 20:53:05 UTC 2011


Author: dim
Date: Mon Aug  8 20:53:04 2011
New Revision: 224722
URL: http://svn.freebsd.org/changeset/base/224722

Log:
  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)

Modified:
  head/sys/boot/common/util.c

Modified: head/sys/boot/common/util.c
==============================================================================
--- head/sys/boot/common/util.c	Mon Aug  8 20:36:52 2011	(r224721)
+++ head/sys/boot/common/util.c	Mon Aug  8 20:53:04 2011	(r224722)
@@ -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;
 


More information about the svn-src-all mailing list