diff --git a/block-qcow2.c b/block-qcow2.c index 5f0fbe8f9e8e4e5fd0fb3aadbb1b43e768b3b49f..693cd77278bd7659d23c51599490f443fcfceef8 100644 --- a/block-qcow2.c +++ b/block-qcow2.c @@ -917,7 +917,7 @@ static uint64_t alloc_cluster_offset(BlockDriverState *bs, /* how many free clusters ? */ while (i < nb_clusters) { - cluster_offset = l2_table[l2_index + i]; + cluster_offset = be64_to_cpu(l2_table[l2_index + i]); if (cluster_offset != 0) break; i++;