[PATCH 03/15] server/red_worker: red_draw_qxl_drawable: protect from NULL dereference in case of buggy driver (or recording)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Alon Levy <alon@xxxxxxxxx>

---
 server/red_worker.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/server/red_worker.c b/server/red_worker.c
index 4b26331..0d0c603 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -3641,6 +3641,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

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]