]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2.c
qcow2: Fix error path for unknown incompatible features
authorKevin Wolf <kwolf@redhat.com>
Thu, 17 Jul 2014 09:41:53 +0000 (11:41 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 18 Jul 2014 12:12:15 +0000 (13:12 +0100)
commit12ac6d3db721a288c8953c5c253230aa0949a0e1
treeab3f09b92659e40af1809e7f65030a56c3f29c68
parent5a7348045091a2bc15d85bb177e5956aa6114e5a
qcow2: Fix error path for unknown incompatible features

qcow2's report_unsupported_feature() had two bugs: A 32 bit truncation
would prevent feature table entries for bits 32-63 from being used, and
it could assign errp multiple times if there was more than one unknown
feature, resulting in an error_set() assertion failure.

Fix the truncation, make sure to set the error exactly once and add a
qemu-iotests case for it.

This fixes https://bugs.launchpad.net/qemu/+bug/1342704/

Reported-by: Maria Kustova <maria.k@catit.be>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/qcow2.c
tests/qemu-iotests/036
tests/qemu-iotests/036.out
tests/qemu-iotests/qcow2.py