From: Eugene (jno) Dvurechenski Date: Mon, 15 Feb 2016 14:30:25 +0000 (+0100) Subject: pc-bios/s390-ccw: fix old bug in ptr increment X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3a3c752f0ba72e57a2f85e9bdce217673be14700;p=qemu.git pc-bios/s390-ccw: fix old bug in ptr increment We need to increment by the size of the structure, whereas 'ns' is 'uint8_t *'. Acked-by: Christian Borntraeger Acked-by: Cornelia Huck Signed-off-by: Eugene (jno) Dvurechenski Signed-off-by: Cornelia Huck --- diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c index 415508b279..492530275d 100644 --- a/pc-bios/s390-ccw/bootmap.c +++ b/pc-bios/s390-ccw/bootmap.c @@ -424,7 +424,7 @@ static void ipl_scsi(void) IPL_assert(magic_match(sec, ZIPL_MAGIC), "No zIPL magic"); ns_end = sec + virtio_get_block_size(); - for (ns = (sec + pte_len); (ns + pte_len) < ns_end; ns++) { + for (ns = (sec + pte_len); (ns + pte_len) < ns_end; ns += pte_len) { prog_table_entry = (ScsiBlockPtr *)ns; if (!prog_table_entry->blockno) { break;