libxlu: don't crash on empty lists
PATCH 1/1 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 <[email protected]>
tools/libxl/libxlu_cfg.c +1 -1
@@ -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));
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 <[email protected]>
tools/libxl/libxlu_cfg.c +1 -1
@@ -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));
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 6 lines · Jan Beulich
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 <[email protected]>
Thanks for the fix.
Acked-by Wei Liu <[email protected]>