[Spice-devel] [PATCH 07/11] server/red_worker: red_draw_qxl_drawable: protect from NULL dereference in case of buggy driver (or recording)
Frediano Ziglio
fziglio at redhat.com
Tue Oct 27 12:19:11 PDT 2015
From: Alon Levy <alon at pobox.com>
---
server/red_worker.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/server/red_worker.c b/server/red_worker.c
index 817ff34..9c05eb9 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -3881,6 +3881,11 @@ static void red_draw_qxl_drawable(RedWorker *worker, Drawable *drawable)
image_cache_aging(&worker->image_cache);
+ if (!canvas) {
+ spice_warning("ignoring drawable to destroyed surface %d\n", drawable->surface_id);
+ return;
+ }
+
region_add(&surface->draw_dirty_region, &drawable->red_drawable->bbox);
switch (drawable->red_drawable->type) {
--
2.4.3
More information about the Spice-devel
mailing list