libvirt / libvirt

branch icon v3.7-maint

build has errored
Build #1050 has errored
arrow to build duration

clock icon 11 minutes and 31 seconds

Laine Stump avatarLaine Stump

vbox: fix SEGV during dumpxml of a serial port

commit 77a12987a48 changed the "virDomainChrSourceDef source" inside
virDomainChrDef to "virDomainChrSourceDefPtr source", and started
allocating source inside virDomainChrDefNew(), but vboxDumpSerial()
was allocating a virDomainChrDef with a simple VIR_ALLOC() (i.e. never
calling virDomainChrDefNew()), so source was never initialized,
leading to a SEGV any time a serial port was present. The same problem
was created in vboxDumpParallel().

This patch changes vboxDumpSerial() and vboxDumpParallel() to use
virDomainChrDefNew() instead of VIR_ALLOC(), and changes both of those
functions to return an error if virDomainChrDef() (or any other
allocation) fails.

This resolves: https://bugzilla.redhat.com/1536649

(cherry picked from commit 9c27e464e3b4603cbe13c00787f4c89e5b1e7a68)

Signed-off-by: Laine Stump <laine@laine.org>

Want to know about upcoming build environment updates?

Would you like to stay up-to-date with the upcoming Travis CI build environment updates? We set up a mailing list for you!

SIGN UP HERE
book icon

Documentation about Travis CI







This email was sent to libvirt-ci@redhat.com    unsubscribe from this list