diff options
| author | Tuguoyi <tu.guoyi@h3c.com> | 2019-11-01 07:37:35 +0000 |
|---|---|---|
| committer | Max Reitz <mreitz@redhat.com> | 2019-11-07 14:37:33 +0100 |
| commit | 570542ecb11e04b61ef4b3f4d0965a6915232a88 (patch) | |
| tree | 07b1fc9169e7393641e2048d4cedd4f9c83b1275 /scripts/dump-guest-memory.py | |
| parent | d0f90e1423b4f412adc620eee93e8bfef8af4117 (diff) | |
| download | focaccia-qemu-570542ecb11e04b61ef4b3f4d0965a6915232a88.tar.gz focaccia-qemu-570542ecb11e04b61ef4b3f4d0965a6915232a88.zip | |
qcow2-bitmap: Fix uint64_t left-shift overflow
There are two issues in In check_constraints_on_bitmap(), 1) The sanity check on the granularity will cause uint64_t integer left-shift overflow when cluster_size is 2M and the granularity is BIGGER than 32K. 2) The way to calculate image size that the maximum bitmap supported can map to is a bit incorrect. This patch fix it by add a helper function to calculate the number of bytes needed by a normal bitmap in image and compare it to the maximum bitmap bytes supported by qemu. Fixes: 5f72826e7fc62167cf3a Signed-off-by: Guoyi Tu <tu.guoyi@h3c.com> Message-id: 4ba40cd1e7ee4a708b40899952e49f22@h3c.com Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Cc: qemu-stable@nongnu.org Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'scripts/dump-guest-memory.py')
0 files changed, 0 insertions, 0 deletions