]> git.proxmox.com Git - mirror_qemu.git/commit
block: fix allocation size for dirty bitmap
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 Apr 2012 12:01:04 +0000 (14:01 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 10 May 2012 08:32:11 +0000 (10:32 +0200)
commit71df14fcbe5035d0728f30463414301eb62ad865
tree173287c2a889188b8fb106e24212ea93c9e28b7b
parent63090dac3a7c5fe02b4285cf2e5fb7017d2c7b0e
block: fix allocation size for dirty bitmap

Also reuse elsewhere the new constant for sizeof(unsigned long) * 8.

The dirty bitmap is allocated in bits but declared as unsigned long.
Thus, its memory block is accessed beyond its end unless the image
is a multiple of 64 chunks (i.e. a multiple of 64 MB).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c