[U-Boot] [PATCH v6 4/4] Make printf and vprintf safe from buffer overruns

Wolfgang Denk wd at denx.de
Sat Dec 17 23:34:34 CET 2011


Dear Simon Glass,

In message <1320263530-22843-5-git-send-email-sjg at chromium.org> you wrote:
> From: Sonny Rao <sonnyrao at chromium.org>
> 
> From: Sonny Rao <sonnyrao at chromium.org>
> 
> utilize the added vscnprintf functions to avoid buffer overruns
> The implementation is fairly dumb in that it doesn't detect
> that the buffer is too small, but at least will not cause crashes.
> 
> Signed-off-by: Sonny Rao <sonnyrao at chromium.org>
> ---
> Changes in v2:
> - Use sizeof(printbuffer) instead of CONFIG_SYS_PBSIZE
> - Drop patch which changes network code to use snprintf()
> 
> Changes in v5:
> - Drop limits.h as it is used in only two places in U-Boot
> 
>  common/console.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)

Applied to "next" branch, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
There is, however, a strange, musty smell in the air that reminds  me
of something...hmm...yes...I've got it...there's a VMS nearby, or I'm
a Blit.          - Larry Wall in Configure from the perl distribution


More information about the U-Boot mailing list