]> xenbits.xensource.com Git - libvirt.git/commit
qemu: block: Use correct type when creating image size JSON entries
authorPeter Krempa <pkrempa@redhat.com>
Fri, 30 Aug 2019 14:33:48 +0000 (16:33 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 4 Sep 2019 07:13:49 +0000 (09:13 +0200)
commitf009ad67408e61a745a5366ffe1985fc6e2eca89
tree0ae5c2d5fb6aff19344164bfeaefd0409b129137
parent37acc5fab2426995a3ca171336ef5c2176b63aeb
qemu: block: Use correct type when creating image size JSON entries

The 'u' modifier creates an unsigned int JSON attribute but the disk size
and capacity fields are unsigned long long. If the size of the created
image would be more than 4GiB we'd overflow and create sub-4G image.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_block.c