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

[Xen-devel] [PATCH] libxlu: don't crash on empty lists



Prior to 1a09c5113a ("libxlu: rework internal representation of
setting") empty lists in config files did get accepted. Restore that
behavior.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/tools/libxl/libxlu_cfg.c
+++ b/tools/libxl/libxlu_cfg.c
@@ -397,7 +397,7 @@ XLU_ConfigValue *xlu__cfg_list_mk(CfgPar
     value = malloc(sizeof(*value));
     if (!value) goto xe;
     value->type = XLU_LIST;
-    value->u.list.nvalues = 1;
+    value->u.list.nvalues = !!val;
     value->u.list.avalues = 1;
     value->u.list.values = values;
     memcpy(&value->loc, loc, sizeof(*loc));



Attachment: libxlu-empty-list.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.