Re: [libvirt] [PATCH] Avoid a libvirtd crash on broken input 523418

2009-10-01 Thread Daniel Veillard
On Wed, Sep 30, 2009 at 05:48:49PM +0100, Mark McLoughlin wrote: On Wed, 2009-09-30 at 18:33 +0200, Daniel Veillard wrote: diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 868e865..9cf0af1 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1032,7

[libvirt] [PATCH] Avoid a libvirtd crash on broken input 523418

2009-09-30 Thread Daniel Veillard
A simple typo in an XML domain file could lead to a crash, because we called STRPREFIX() on the looked up value without checking it was non-null. Patch is trivial, and should go in but I wonder if we shouldn't make those STR macros safer too like turning #define STRPREFIX(a,b)

Re: [libvirt] [PATCH] Avoid a libvirtd crash on broken input 523418

2009-09-30 Thread Mark McLoughlin
On Wed, 2009-09-30 at 18:33 +0200, Daniel Veillard wrote: diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 868e865..9cf0af1 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1032,7 +1032,8 @@ virDomainNetDefParseXML(virConnectPtr conn, } else