mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zipl: Add missing check for a nullpointer.
Fixes a bug that leads to a segmentation fault when no parmline is
provided.
Fixes: 11b401b5 ("zipl: move and make check for maximum command line length dynamic")
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
acf30de415
commit
6ff8202fa9
@@ -790,7 +790,7 @@ check_common_ipl_data(struct job_common_ipl_data *common, const char *section,
|
||||
if (!max_parm_size)
|
||||
max_parm_size = LEGACY_MAXIMUM_PARMLINE_SIZE;
|
||||
|
||||
len = strlen(common->parmline);
|
||||
len = common->parmline ? strlen(common->parmline) : 0;
|
||||
if (len > max_parm_size) {
|
||||
error_text("The length of the parameters line "
|
||||
"(%d bytes) exceeds the allowed maximum "
|
||||
|
||||
Reference in New Issue
Block a user