zipl/stage3: skip the equal sign when replacing

Skip the equal sign when replacing the original command line.

Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Marc Hartmayer
2020-04-08 15:25:32 +02:00
committed by Jan Höppner
parent 4eea67cd6f
commit 0ac7ce964e

View File

@@ -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 */