From: Graeme Russ <graeme.russ@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] x86: Change printf to puts to avoid a buffer overflow
Date: Sun, 13 Nov 2011 22:43:19 +1100 [thread overview]
Message-ID: <4EBFAD57.30607@gmail.com> (raw)
In-Reply-To: <1321149776-14830-1-git-send-email-gabeblack@chromium.org>
On 13/11/11 13:02, Gabe Black wrote:
> printf as currently implemented in u-boot has a problem where it can
> overflow an internal buffer if it prints an expanded string that's too
> long. Our command lines are long enough to cause this problem. A fix
> should be coming, but in the mean time this change replaces a problematic
> printf with a few calls to puts that have the same effect. This may perform
> slightly better because it should avoid a copy and scanning for format
> specifiers. The amount of time it actually takes up is very tiny relative
> to everything else so in practice that's probably irrelevant.
>
> Signed-off-by: Gabe Black <gabeblack@chromium.org>
Applied to u-boot-x86/master
Thanks,
Graeme
prev parent reply other threads:[~2011-11-13 11:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-08 9:21 [U-Boot] [PATCH] [x86] [zboot] Change printf to puts to avoid a buffer overflow Gabe Black
2011-11-08 13:48 ` Mike Frysinger
2011-11-12 10:22 ` Graeme Russ
2011-11-13 2:02 ` [U-Boot] [PATCH v2] x86: " Gabe Black
2011-11-13 11:43 ` Graeme Russ [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EBFAD57.30607@gmail.com \
--to=graeme.russ@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox