mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zipl: check add_envblk predicate when setting stage3_parms
Set stage3_parms.envblk_len to 0, if add_envblk is false. This fixes segmentation fault when performing job with not defined zIPL environment (e.g. installing SCSI dump) Signed-off-by: Eduard Shishkin <edward6@linux.ibm.com> Tested-by: Alexander Egorenkov <egorenar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
f8331a4b8e
commit
969a439aaa
@@ -675,7 +675,8 @@ static int add_ipl_program(int fd, char *filename,
|
||||
IMAGE_ENTRY,
|
||||
(info->type == disk_type_scsi) ? 0 : 1,
|
||||
flags, ipl->image_addr, image_size,
|
||||
ipl->envblk_addr, envblk->size);
|
||||
ipl->envblk_addr,
|
||||
add_envblk ? envblk->size : 0);
|
||||
if (rc) {
|
||||
free(table);
|
||||
return rc;
|
||||
|
||||
Reference in New Issue
Block a user