From: Marc-Andre Lureau <marcandre.lureau@xxxxxxxxxx> Assert on valid arguments, and return early if the given region is empty. Fixes: http://bugzilla.redhat.com/1151559 --- src/qxl_surface.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qxl_surface.c b/src/qxl_surface.c index 1075eae..242083e 100644 --- a/src/qxl_surface.c +++ b/src/qxl_surface.c @@ -140,6 +140,11 @@ download_box_no_update (qxl_surface_t *surface, int x1, int y1, int x2, int y2) void qxl_download_box (qxl_surface_t *surface, int x1, int y1, int x2, int y2) { + assert (x2 >= x1 && y2 >= y1); + + if (x1 == x2 || y1 == y2) + return; + surface->qxl->bo_funcs->update_area(surface, x1, y1, x2, y2); download_box_no_update(surface, x1, y1, x2, y2); -- 1.9.3 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel