aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/misc_helper.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2013-10-09 10:42:56 +0200
committerKevin Wolf <kwolf@redhat.com>2013-10-11 16:49:59 +0200
commit998b959c1e59044f5d5f64c482f4ce8facc8e0bc (patch)
tree54aeeb7fcc771e456e6bdd761991122f76e65869 /target-ppc/misc_helper.c
parentf252080453ec081ba653bba4e0c1ca86c52cf19f (diff)
qcow2: Use pread for inactive L1 in overlap check
Currently, qcow2_check_metadata_overlap uses bdrv_read to read inactive L1 tables from disk. The number of sectors to read is calculated through a truncating integer division, therefore, if the L1 table size is not a multiple of the sector size, the final entries will not be read and their entries in memory remain undefined (from the g_malloc). Using bdrv_pread fixes this. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'target-ppc/misc_helper.c')
0 files changed, 0 insertions, 0 deletions