qcow2: Fix error path for unknown incompatible features

Enterprise / Virtualization / QEMU - Kevin Wolf [redhat.com] - 18 July 2014 07:12 UTC

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/

12ac6d3 qcow2: Fix error path for unknown incompatible features
block/qcow2.c | 21 ++++++++++++-----
tests/qemu-iotests/036 | 52 ++++++++++++++++++++++++++++++++++++++++++-
tests/qemu-iotests/036.out | 35 +++++++++++++++++++++++++++++
tests/qemu-iotests/qcow2.py | 15 ++++++++-----
4 files changed, 112 insertions(+), 11 deletions(-)

Upstream: git.qemu.org


  • Share