On Wed, Jul 21, 2010 at 11:28:50AM +0100, Daniel P. Berrange wrote:
On Wed, Jul 21, 2010 at 12:20:13PM +0200, Daniel Veillard wrote:
> On Tue, Jul 20, 2010 at 02:09:31PM +0100, Daniel P. Berrange wrote:
> > From: Daniel P. Berrange <dan(a)berrange.com>
> [...]
> > + if (def->memballoon) {
> > + if (def->memballoon->model !=
VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO) {
> > + qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> > + _("Memory balloon device type '%s' is
not supported by this version of qemu"),
> > +
virDomainMemballoonModelTypeToString(def->memballoon->model));
> > + goto error;
>
> Hum, this is likely to lead to a printf( "%s", NULL) isn't it ?
> is that dangerous report or useful report ?
The 'model' value is a managed enum, so we validate at compile time that
every enum value has a corresponding string, and all code which sets this
value uses the enum APIs. So this will never return NULL
hum, right I got confused, ACK,
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/