[U-Boot] [PATCH V2] common: cli_simple: use strlcpy instead of strcpy

Simon Glass sjg at chromium.org
Mon Jan 11 17:58:52 CET 2016


On 9 January 2016 at 22:01, Peng Fan <van.freenix at gmail.com> wrote:
> Report Coverity log:
> Destination buffer too small (STRING_OVERFLOW)
> string_overflow: You might overrun the 1024 byte destination string
> lastcommand by writing 1025 bytes from console_buffer
>
> Signed-off-by: Peng Fan <van.freenix at gmail.com>
> Cc: Heiko Schocher <hs at denx.de>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Tom Rini <trini at konsulko.com>
> ---
>
> Changes V2:
>  Use strlcpy instead of strncpy.
>
>  common/cli_simple.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list