Date: Mon, 8 Aug 2011 20:53:04 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r224722 - head/sys/boot/common Message-ID: <201108082053.p78Kr4Ro063297@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108082053.p78Kr4Ro063297>