mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 01:48:07 +02:00
xcb: Check that the extents are inside our surface
The previous commit fixed a bug in cairo-xlib found by a similar assert, so this seems to be a good idea to have. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
73e8384ac8
commit
8877ca23f5
1 changed files with 5 additions and 0 deletions
|
|
@ -346,6 +346,11 @@ _get_image (cairo_xcb_surface_t *surface,
|
|||
xcb_get_image_reply_t *reply;
|
||||
cairo_int_status_t status;
|
||||
|
||||
assert (x >= 0);
|
||||
assert (y >= 0);
|
||||
assert (x + width <= surface->width);
|
||||
assert (y + height <= surface->height);
|
||||
|
||||
if (surface->deferred_clear) {
|
||||
image = (cairo_image_surface_t *)
|
||||
_cairo_image_surface_create_with_pixman_format (NULL,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue