]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuBuildVideoCommandLine: Don't access def->videos without check
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 14 Mar 2016 08:34:43 +0000 (09:34 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 14 Mar 2016 08:34:43 +0000 (09:34 +0100)
commit2e70af12f2d63eaba2294481762fe1df8b5c0e3e
tree1ba44fe8006dcc1a72e5f1313aa9d42937e07248
parent95ca4fe2f272d1c751acd278cc1617fe2aa1b94b
qemuBuildVideoCommandLine: Don't access def->videos without check

This function can be called over a domain definition that has no
video configured. The
tests/qemuxml2argvdata/qemuxml2argv-minimal.xml file could serve
as an example. Problem is, before the check that domain has some
or none video configured, def->videos is dereferenced causing a
segmentation fault in case there's none video configured.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_command.c