diff options
| author | Max Reitz <mreitz@redhat.com> | 2013-10-09 10:42:56 +0200 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2013-10-11 16:49:59 +0200 |
| commit | 998b959c1e59044f5d5f64c482f4ce8facc8e0bc (patch) | |
| tree | 54aeeb7fcc771e456e6bdd761991122f76e65869 /scripts/qapi-types.py | |
| parent | f252080453ec081ba653bba4e0c1ca86c52cf19f (diff) | |
| download | focaccia-qemu-998b959c1e59044f5d5f64c482f4ce8facc8e0bc.tar.gz focaccia-qemu-998b959c1e59044f5d5f64c482f4ce8facc8e0bc.zip | |
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 'scripts/qapi-types.py')
0 files changed, 0 insertions, 0 deletions