diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 8808b08b4..0bc294631 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -3067,7 +3067,7 @@ static enum compl_status_e vdisk_exec_read_capacity16(struct vdisk_cmd_params *p nblocks = virt_dev->nblocks - 1; if ((cmd->cdb[14] & 1) == 0) { - uint64_t lba = get_unaligned_be64(&cmd->cdb[2]); + uint32_t lba = get_unaligned_be32(&cmd->cdb[2]); if (lba != 0) { TRACE_DBG("PMI zero and LBA not zero (cmd %p)", cmd); scst_set_cmd_error(cmd,