]> Git Repo - qemu.git/commitdiff
qxl: check release info object
authorPrasad J Pandit <[email protected]>
Thu, 25 Apr 2019 06:35:34 +0000 (12:05 +0530)
committerGerd Hoffmann <[email protected]>
Tue, 7 May 2019 07:11:27 +0000 (09:11 +0200)
When releasing spice resources in release_resource() routine,
if release info object 'ext.info' is null, it leads to null
pointer dereference. Add check to avoid it.

Reported-by: Bugs SysSec <[email protected]>
Signed-off-by: Prasad J Pandit <[email protected]>
Message-id: 20190425063534[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
hw/display/qxl.c

index c8ce5781e037fa607966b9027fa3776f87a337db..632923add2395558f2abe1ab4aff30508af41f8b 100644 (file)
@@ -777,6 +777,9 @@ static void interface_release_resource(QXLInstance *sin,
     QXLReleaseRing *ring;
     uint64_t *item, id;
 
+    if (!ext.info) {
+        return;
+    }
     if (ext.group_id == MEMSLOT_GROUP_HOST) {
         /* host group -> vga mode update request */
         QXLCommandExt *cmdext = (void *)(intptr_t)(ext.info->id);
This page took 0.029385 seconds and 4 git commands to generate.