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;
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to