mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-07 18:34:19 +00:00
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.
This commit is contained in:
parent
5322d43146
commit
763e05ee30
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user