Commit d52680fc authored by Prasad J Pandit's avatar Prasad J Pandit Committed by Gerd Hoffmann
Browse files

qxl: check release info object



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: default avatarBugs SysSec <bugs-syssec@rub.de>
Signed-off-by: default avatarPrasad J Pandit <pjp@fedoraproject.org>
Message-id: 20190425063534.32747-1-ppandit@redhat.com
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent a6ae2383
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);