[Spice-devel] [PATCH 4/5] server: Handle NULL image in red_update_streamable

alexl at redhat.com alexl at redhat.com
Tue Sep 21 11:19:04 PDT 2010


From: Alexander Larsson <alexl at redhat.com>

A NULL src bitmap means self_bitmap, which is not a stream, so abort.
---
 server/red_worker.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/server/red_worker.c b/server/red_worker.c
index 5a2477a..f307aef 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -3130,7 +3130,8 @@ static inline void red_update_streamable(RedWorker *worker, Drawable *drawable,
     }
 
     image = red_drawable->u.copy.src_bitmap;
-    if (image->descriptor.type != SPICE_IMAGE_TYPE_BITMAP) {
+    if (image == NULL ||
+        image->descriptor.type != SPICE_IMAGE_TYPE_BITMAP) {
         return;
     }
 
-- 
1.7.2.2



More information about the Spice-devel mailing list