[PATCH 1/2] Fix typo in handling JSON graphics events

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

 



A typo in handling graphics events allowed for a potential
NULL pointer crash if a parameter was not defined

* src/qemu/qemu_monitor_json.c: s/remoteService/localService/
---
 src/qemu/qemu_monitor_json.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 4a25e98..6d8f328 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -646,8 +646,8 @@ static void qemuMonitorJSONHandleGraphics(qemuMonitorPtr mon, virJSONValuePtr da
         return;
     }
     localService = virJSONValueObjectGetString(server, "service");
-    if (!remoteService)
-        remoteService = ""; /* Spice has multiple ports, so this isn't provided */
+    if (!localService)
+        localService = ""; /* Spice has multiple ports, so this isn't provided */
 
     remoteFamily = virJSONValueObjectGetString(client, "family");
     if (!authScheme) {
-- 
1.6.6.1

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