On 26.10.2012 23:42, Kevin Wolf wrote:
> A missing factor for the refcount table entry size in the calculation
> could mean that too little memory was allocated for the in-memory
> representation of the table, resulting in a buffer overflow.
> 
> Signed-off-by: Kevin Wolf <kw...@redhat.com>

Reviewed-and-tested-by: Michael Tokarev <m...@tls.msk.ru>

(but the thing is rather trivial and obvious :)
(this fixes https://bugs.launchpad.net/qemu/+bug/1071236 fwiw --
maybe we should add some references to bugs when the work/patch
is after a bugreport)

This fix is applicable to -stable, at least to 1.2 and 1.1 versions.
For 0.15, while the patch applies, qcow2 driver has other bug(s)
which prevents the testcase (with qemu-img create) from working:

 $ ./qemu-img-0.15 create -f qcow2 -o cluster_size=512,preallocation=metadata 
disk.img 4G
 Formatting 'disk.img', fmt=qcow2 size=4294967296 encryption=off 
cluster_size=512 preallocation='metadata'
 qemu-img: disk.img: error while creating qcow2: Unknown error 1652533248

Thanks,

/mjt

Reply via email to