diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-09-21 20:11:18 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-09-21 20:11:18 +0200 |
commit | 763e05ee30c67014c3e843b8e4bc5a7d7e9aac74 (patch) | |
tree | e37b1c7e0d95360826a4e05ba33c213cbe7d4d0a /server | |
parent | 5322d4314684531f7b09dc74a2b37f7c5d55929b (diff) | |
download | spice-763e05ee30c67014c3e843b8e4bc5a7d7e9aac74.tar.gz spice-763e05ee30c67014c3e843b8e4bc5a7d7e9aac74.tar.xz spice-763e05ee30c67014c3e843b8e4bc5a7d7e9aac74.zip |
server: Use the right image size for self_bitmap
The self_bitmap is the size of self_bitmap_area, not the bbox.
This is especially important since we later copy the self_bitmap_area
into the new bitmap, and if that is larger than bbox then we will
overwrite random memory.
Diffstat (limited to 'server')
-rw-r--r-- | server/red_worker.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/red_worker.c b/server/red_worker.c index ef1c998a..5a2477a3 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -3271,8 +3271,8 @@ static inline int red_handle_self_bitmap(RedWorker *worker, Drawable *drawable) bpp = SPICE_SURFACE_FMT_DEPTH(surface->context.format) / 8; - width = drawable->red_drawable->bbox.right - drawable->red_drawable->bbox.left; - height = drawable->red_drawable->bbox.bottom - drawable->red_drawable->bbox.top; + width = drawable->red_drawable->self_bitmap_area.right - drawable->red_drawable->self_bitmap_area.left; + height = drawable->red_drawable->self_bitmap_area.bottom - drawable->red_drawable->self_bitmap_area.top; dest_stride = SPICE_ALIGN(width * bpp, 4); image = spice_new0(SpiceImage, 1); |