From: Peter Krempa Date: Wed, 14 Sep 2016 03:58:33 +0000 (+0200) Subject: qemu: process: Fix off-by-one in vcpu order duplicate error message X-Git-Tag: v2.3.0-rc2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d5dd28995efbe1275290d54a2d7766a4f9c7204;p=thirdparty%2Flibvirt.git qemu: process: Fix off-by-one in vcpu order duplicate error message The bitmap indexes for the order duplicate check are shifted to 0 since vcpu order 0 is not allowed. The error message doesn't need such treating though. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1370360 --- diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 27d04a4346..e4f27eaf5e 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4807,7 +4807,7 @@ qemuProcessValidateHotpluggableVcpus(virDomainDefPtr def) if (vcpu->order != 0) { if (virBitmapIsBitSet(ordermap, vcpu->order - 1)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("duplicate vcpu order '%u'"), vcpu->order - 1); + _("duplicate vcpu order '%u'"), vcpu->order); goto cleanup; }