]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: honor maxnames in nodeListDevices API
authorPavel Hrdina <phrdina@redhat.com>
Tue, 2 Jan 2018 09:18:17 +0000 (10:18 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Tue, 2 Jan 2018 09:28:09 +0000 (10:28 +0100)
Introduced by commit <4ae9dbea99c>.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1528572

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/conf/virnodedeviceobj.c

index 872ec1fd4b5979fdd6926d2e155da07f9e9c0d4b..c4e3a40d3ab38bedf6980433baf35cf5880c5b9e 100644 (file)
@@ -798,6 +798,9 @@ virNodeDeviceObjListGetNamesCallback(void *payload,
     if (data->error)
         return 0;
 
+    if (data->nnames >= data->maxnames)
+        return 0;
+
     virObjectLock(obj);
     def = obj->def;