]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuMigrationCookieXMLParse: Check domain element count more defensively
authorPeter Krempa <pkrempa@redhat.com>
Wed, 30 Sep 2020 13:00:43 +0000 (15:00 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 5 Oct 2020 13:58:52 +0000 (15:58 +0200)
commit25b944e0678d40fae386b46e77fbc361360af368
treec3fc0d581aebd0475d34aed60ab39f51ddc1fd9b
parent4a7dd2780c306416d9e80c7bffbef26493ca6728
qemuMigrationCookieXMLParse: Check domain element count more defensively

Make sure that 'virXPathNodeSet' returns '1' as the only expected value
rather than relying on the fact that the previous check for the number
of elements ensures success of the subsequent call.

The error message no longer mentions the number of <domain> elements in
the cookie, but this is a very unlikely internal error anyways.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_migration_cookie.c