Re: [libvirt] [PATCH] cpuCompare: Fix crash on unexpected CPU XML

2010-07-12 Thread Jiri Denemark
> > though that could have been checked one level down in cpuCompare() which > > could also make some checking about host and host->arch before > > dereferencing. > > Either it's an internal API where we trust the args or it's not > > but it's important to fix the crash either there or in cpuCompar

Re: [libvirt] [PATCH] cpuCompare: Fix crash on unexpected CPU XML

2010-07-12 Thread Jiri Denemark
> > When comparing a CPU without element, such as > > > > > > > > > > > > libvirt would happily crash without warning. > > --- > > src/cpu/cpu.c |6 ++ > > 1 files changed, 6 insertions(+), 0 deletions(-) > > > > diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c > > index 2

Re: [libvirt] [PATCH] cpuCompare: Fix crash on unexpected CPU XML

2010-07-12 Thread Daniel Veillard
On Mon, Jul 12, 2010 at 05:50:24PM +0200, Jiri Denemark wrote: > When comparing a CPU without element, such as > > > > > > libvirt would happily crash without warning. > --- > src/cpu/cpu.c |6 ++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/sr

[libvirt] [PATCH] cpuCompare: Fix crash on unexpected CPU XML

2010-07-12 Thread Jiri Denemark
When comparing a CPU without element, such as libvirt would happily crash without warning. --- src/cpu/cpu.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index 279eee7..def6974 100644 --- a/src/cpu/cpu.c +++ b/src