From 0ac7ce964ed089a2614dbfcffb89bd6c4175992b Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Wed, 8 Apr 2020 15:25:32 +0200 Subject: [PATCH] zipl/stage3: skip the equal sign when replacing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Skip the equal sign when replacing the original command line. Reviewed-by: Stefan Haberland Signed-off-by: Marc Hartmayer Signed-off-by: Jan Höppner --- zipl/boot/stage3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zipl/boot/stage3.c b/zipl/boot/stage3.c index 115a2085..250c50e8 100644 --- a/zipl/boot/stage3.c +++ b/zipl/boot/stage3.c @@ -199,7 +199,10 @@ void start(void) * if extra parm string starts with '=' replace original string, * else append */ - if (*cextra == 0x3d) { + if (*cextra == 0x3d && cextra_len >= 1) { + /* skip '=' */ + cextra++; + cextra_len--; memcpy(cmdline, cextra, cextra_len); } else if (cmdline_len + 1 <= COMMAND_LINE_SIZE - 1) { /* add blank */