From: Wolfgang Denk Date: Fri, 12 Mar 2010 00:18:19 +0100 Subject: [U-Boot] [PATCH v3] cmd_mtdparts.c: prevent printbuffer overflows In-Reply-To: <1266967784-12611-1-git-send-email-agust@denx.de> References: <1266967784-12611-1-git-send-email-agust@denx.de> Message-ID: <20100311231819.3BA29E22AD1@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Anatolij Gustschin, In message <1266967784-12611-1-git-send-email-agust@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 > --- > 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