[PATCH 2.5/4] qemu: add one more check for remote_display_port options

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

 



To be squashed into PATCH 2/4
---
Sorry for the confusion, but after I sent the series, I realized that
this one check is missing.

 src/qemu/qemu_conf.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index a533523..1a9ee6d 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -301,6 +301,14 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
         driver->remotePortMax = p->l + 1;
     }

+    if (driver->remotePortMin > driver->remotePortMax) {
+        qemuReportError(VIR_ERR_INTERNAL_ERROR,
+                        _("%s: remote_display_port_min: min port must not be greater than max port"),
+                        filename);
+        virConfFree(conf);
+        return -1;
+    }
+
     p = virConfGetValue (conf, "user");
     CHECK_TYPE ("user", VIR_CONF_STRING);
     if (!(user = strdup(p && p->str ? p->str : QEMU_USER))) {
--
1.7.8.6

--
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]