[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191127203055.521521735@linuxfoundation.org>
Date: Wed, 27 Nov 2019 21:29:30 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Angelo Dureghello <angelo@...am.it>,
Greg Ungerer <gerg@...ux-m68k.org>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 4.14 037/211] m68k: fix command-line parsing when passed from u-boot
From: Angelo Dureghello <angelo@...am.it>
[ 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 <angelo@...am.it>
Signed-off-by: Greg Ungerer <gerg@...ux-m68k.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
arch/m68k/kernel/uboot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
2.20.1
Powered by blists - more mailing lists