mirror of
https://github.com/qemu/qemu.git
synced 2025-01-21 13:03:26 +08:00
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: Yu Lu <ini.universe@gmail.com> Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com> Reviewed-by: Prasad J Pandit <pjp@fedoraproject.org> Message-Id: <20210520105833.183160-1-mcascell@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
4087ecb842
commit
e932e9f327
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user