[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



> > 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 cpuCompare
> 
> Well, both of them are internal.

Eh, I sent it without finishing this part... it must be the hot weather.

I just wanted to add that cpuCompareXML is used for parsing user-supplied data
making it more external while cpuCompare is for internal use only.

> cpuCompare is used with virCPUDef structure created internally in libvirt so
> we trust the caller that it knows what it's doing. However, we should probably
> add some check to cpu* functions used internally to avoid troubles when we
> change something in the future.
> 
> But that is a separate issue with lower priority, so I pushed this fix.

Jirka


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]