Skip to content
Snippets Groups Projects
Commit e932e9f3 authored by Mauro Matteo Cascella's avatar Mauro Matteo Cascella Committed by Gerd Hoffmann
Browse files

ui/spice-display: check NULL pointer in interface_release_resource()


Check rext.info to avoid potential NULL pointer dereference. A similar check
exists in interface_release_resource() in hw/display/qxl.c.

Reported-by: default avatarYu Lu <ini.universe@gmail.com>
Signed-off-by: default avatarMauro Matteo Cascella <mcascell@redhat.com>
Reviewed-by: default avatarPrasad J Pandit <pjp@fedoraproject.org>
Message-Id: <20210520105833.183160-1-mcascell@redhat.com>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 4087ecb8
No related branches found
No related tags found
No related merge requests found
......@@ -561,6 +561,10 @@ static void interface_release_resource(QXLInstance *sin,
SimpleSpiceCursor *cursor;
QXLCommandExt *ext;
if (!rext.info) {
return;
}
ext = (void *)(intptr_t)(rext.info->id);
switch (ext->cmd.type) {
case QXL_CMD_DRAW:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment