[U-Boot] [PATCH v3] cmd_mtdparts.c: prevent printbuffer overflows

Wolfgang Denk wd at denx.de
Fri Mar 12 00:18:19 CET 2010


Dear Anatolij Gustschin,

In message <1266967784-12611-1-git-send-email-agust at denx.de> you wrote:
> The length of configured MTDPARTS_DEFAULT string
> could be greater than console printbuffer size.
> Replace printf() by puts() to avoid potential buffer
> overflows.
> 
> Signed-off-by: Anatolij Gustschin <agust at denx.de>
> ---
> Changes since v2:
>  - add comment explaining the reason for usage of puts().
> 
> Changes since v1:
>  - use puts() instead of printf() as suggested by Wolfgang.
> 
>  common/cmd_mtdparts.c |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)

Applied, 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
In the future, you're going to get computers as prizes  in  breakfast
cereals.  You'll  throw  them out because your house will be littered
with them.                                             - Robert Lucky


More information about the U-Boot mailing list