[Spice-commits] server/display-channel.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 20 08:57:44 UTC 2019
server/display-channel.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit bf968572d1f7a0052df2615b69b361b0ec652a29
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Mon Jun 17 17:12:17 2019 +0100
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 at redhat.com>
Acked-by: Snir Sheriber <ssheribe at redhat.com>
diff --git a/server/display-channel.c b/server/display-channel.c
index 071c0140..7ddd44c1 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -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);
More information about the Spice-commits
mailing list