From: Angelo Dureghello Date: Fri, 7 Sep 2018 12:44:25 +0000 (+0200) Subject: m68k: fix command-line parsing when passed from u-boot X-Git-Tag: v4.19.87~246 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=92ac0e3249746a852478af8c644aa81657c479ad;p=thirdparty%2Fkernel%2Fstable.git m68k: fix command-line parsing when passed from u-boot [ Upstream commit 381fdd62c38344a771aed06adaf14aae65c47454 ] This patch fixes command_line array zero-terminated one byte over the end of the array, causing boot to hang. Signed-off-by: Angelo Dureghello Signed-off-by: Greg Ungerer Signed-off-by: Sasha Levin --- diff --git a/arch/m68k/kernel/uboot.c b/arch/m68k/kernel/uboot.c index b29c3b241e1bb..1070828770645 100644 --- a/arch/m68k/kernel/uboot.c +++ b/arch/m68k/kernel/uboot.c @@ -102,5 +102,5 @@ __init void process_uboot_commandline(char *commandp, int size) } parse_uboot_commandline(commandp, len); - commandp[size - 1] = 0; + commandp[len - 1] = 0; }