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

Eric Blake eblake at redhat.com
Tue May 11 15:18:39 UTC 2010


On 05/11/2010 08:36 AM, Daniel P. Berrange wrote:
> 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 */

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100511/5a1f92a2/attachment-0001.sig>


More information about the libvir-list mailing list