From: Tom Rini Date: Mon, 12 May 2014 21:53:07 -0400 Subject: [U-Boot] hush shell: Avoid string write overflow when entering max cmd length In-Reply-To: <1398432943-8193-1-git-send-email-kotnes@cisco.com> References: <1398432943-8193-1-git-send-email-kotnes@cisco.com> Message-ID: <20140513015307.GX22182@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Apr 25, 2014 at 03:35:43PM +0200, Kristian Otnes wrote: > console_buffer array is defined to be CONFIG_SYS_CBSIZE + 1 long, > whereas the_command array only CONFIG_SYS_CBSIZE long. Subsequent > use of strcpy(the_command, console_buffer) will write final \0 > terminating byte outside the_command array when entering a command > of max length. > > Signed-off-by: Kristian Otnes cisco com> Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: