[libvirt] [PATCHv2 2/2] conf: Fix usage of virBitmapParse

Peter Krempa pkrempa at redhat.com
Wed Jan 23 14:47:30 UTC 2013


virNetworkObjUpdateParseFile used ',' as the termination character for
virBitmapParse. This would break if an incontiguous range would be
parsed.
---
 src/conf/network_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 9c35ea8..c93916d 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -1856,7 +1856,7 @@ virNetworkObjUpdateParseFile(const char *filename,
         ctxt->node = node;
         class_id = virXPathString("string(./class_id[1]/@bitmap)", ctxt);
         if (class_id &&
-            virBitmapParse(class_id, ',',
+            virBitmapParse(class_id, 0,
                            &net->class_id, CLASS_ID_BITMAP_SIZE) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
                            _("Malformed 'class_id' attribute: %s"),
-- 
1.8.1.1




More information about the libvir-list mailing list