mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-13 10:43:37 +00:00
display-channel: Avoid potential crash from buggy guest driver
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1582137. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Snir Sheriber <ssheribe@redhat.com>
This commit is contained in:
parent
1a3c0b1ee6
commit
bf968572d1
@ -2032,7 +2032,11 @@ void display_channel_update(DisplayChannel *display,
|
||||
SpiceRect rect;
|
||||
RedSurface *surface;
|
||||
|
||||
spice_return_if_fail(display_channel_validate_surface(display, surface_id));
|
||||
// Check that the request is valid, the surface_id comes directly from the guest
|
||||
if (!display_channel_validate_surface(display, surface_id)) {
|
||||
// just return, display_channel_validate_surface already logged a warning
|
||||
return;
|
||||
}
|
||||
|
||||
red_get_rect_ptr(&rect, area);
|
||||
display_channel_draw(display, &rect, surface_id);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user