[libvirt] [PATCH 2/2] xenParseXM: don't dereference NULL pointer when script is empty
Guido Günther
agx at sigxcpu.org
Thu Oct 6 11:36:39 UTC 2011
On Thu, Oct 06, 2011 at 11:56:29AM +0200, Michal Privoznik wrote:
> On 06.10.2011 11:16, Guido Günther wrote:
> > O.k. to apply?
> > -- Guido
> >
> > ---
> > src/xenxs/xen_xm.c | 6 +++---
> > 1 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/xenxs/xen_xm.c b/src/xenxs/xen_xm.c
> > index d057043..30188e2 100644
> > --- a/src/xenxs/xen_xm.c
> > +++ b/src/xenxs/xen_xm.c
> > @@ -697,8 +697,8 @@ xenParseXM(virConfPtr conf, int xendConfigVersion,
> > }
> > }
> >
> > - if (bridge[0] || STREQ(script, "vif-bridge") ||
> > - STREQ(script, "vif-vnic")) {
> > + if (bridge[0] || (script && (STREQ(script, "vif-bridge") ||
>
> I'd rather use STREQ_NULLABLE here.
In fact I was looking for that kind of function in hacking.html. New
patch attached.
Cheers,
-- Guido
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-xenParseXM-don-t-dereference-NULL-pointer-when-scrip.patch
Type: text/x-diff
Size: 1366 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111006/0b6ad06e/attachment-0001.bin>
More information about the libvir-list
mailing list