mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Abbreviated commands are not recognized and zkey issues an invalid command error. In is_command(), the abbreviated command string is copied into the command_str variable. Because this variable is not initialized and, thus, might contain arbitrary data, a NUL-terminated is not guaranteed. The following string comparison is very likely to fail. Correct this problem by comparing up to the length of the command string only. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>