]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: domain: Fix potential NULL deref when parsing job private data
authorPeter Krempa <pkrempa@redhat.com>
Mon, 2 Sep 2019 14:11:46 +0000 (16:11 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 3 Sep 2019 12:38:34 +0000 (14:38 +0200)
commited7e342b0ac95c6ed589f463f728073fea835ee3
treeecc8502d94aa43f38fb0a734da9fc324b448678e
parentdfd33c1ffbb010dcc346f4d9b8fc9710717e8bb6
qemu: domain: Fix potential NULL deref when parsing job private data

A specially crafted XML which would reference a non-existing disk but
request the mirror to be registered with the blockjob could potentially
make the parser dereference NULL. Fix it by moving the code slightly and
just treat it as a wrong job XML. Found by Coverity.

Reported-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_domain.c