libvirt/src/phyp
Mattias Bolte 1aa1683377 Power Hypervisor: fix potential segfault
I came across this line in the phypOpen function:

char string[strlen(conn->uri->path)];

Here the path part of the given URI is used without checking it for
NULL, this can cause a segfault as strlen expects a string != NULL.
Beside that uuid_db and connection_data leak in case of an error.

In this line

conn->uri->path = string;

the original path of the URI leaks. The patch adds a VIR_FREE call
before setting the new path.

The attached patch is compile-tested but I don't have a Power
Hypervisor installation at hand to test it for real.

Matthias

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2009-08-20 12:53:17 +02:00
..
phyp_driver.c Power Hypervisor: fix potential segfault 2009-08-20 12:53:17 +02:00
phyp_driver.h Fix phyp escape_specialcharacters. 2009-08-11 13:32:03 +02:00