[PATCH v2 3/4] remote: Add a check for zero sized client-side buffers

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

 



Adjustment to the dispatch code which is not generated by
gendispatch.pl.

Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
---
 src/remote/remote_daemon_dispatch.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c
index f369ffb02a..1d75ec3d37 100644
--- a/src/remote/remote_daemon_dispatch.c
+++ b/src/remote/remote_daemon_dispatch.c
@@ -2753,6 +2753,12 @@ remoteDispatchDomainGetVcpuPinInfo(virNetServerPtr server G_GNUC_UNUSED,
         goto cleanup;
     }
 
+    if (args->ncpumaps == 0) {
+        ret->cpumaps.cpumaps_len = 0;
+        rv = 0;
+        goto cleanup;
+    }
+
     if (INT_MULTIPLY_OVERFLOW(args->ncpumaps, args->maplen) ||
         args->ncpumaps * args->maplen > REMOTE_CPUMAPS_MAX) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("maxinfo * maplen > REMOTE_CPUMAPS_MAX"));
-- 
2.23.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux