mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
9a68a25ab6
`src` parameter for `memcpy` is set to `cextra + begin` but the offset begin is not taken into account for the calculation of the length that should be copied. Fix this by increment the cextra pointer for each skipped whitespace of the extra parameter. While at it, rename `end` variable to `cmdline_len`, `command_line` variable to `cmdline`, remove useless void pointer cast, and use strlen instead of a while loop to determine the cmdline string length. Reviewed-by: Philipp Rudo <prudo@linux.ibm.com> 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>