[librsvg/librsvg-2.40] feTile: don't divide by zero if the input surface has empty bounds
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/librsvg-2.40] feTile: don't divide by zero if the input surface has empty bounds
- Date: Thu, 6 Jul 2017 18:04:17 +0000 (UTC)
commit 4c23831871b1bbb2fe569f70f813e2f703ea4eb3
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Jul 6 13:02:03 2017 -0500
feTile: don't divide by zero if the input surface has empty bounds
Thanks to Stefan Cornelius <scorneli redhat com> for the test file.
rsvg-filter.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/rsvg-filter.c b/rsvg-filter.c
index b9e7428..bb34f45 100644
--- a/rsvg-filter.c
+++ b/rsvg-filter.c
@@ -4866,6 +4866,11 @@ rsvg_filter_primitive_tile_render (RsvgFilterPrimitive * self, RsvgFilterContext
in = input.surface;
boundarys = input.bounds;
+ if ((boundarys.x0 >= boundarys.x1) || (boundarys.y0 >= boundarys.y1)) {
+ cairo_surface_destroy (in);
+ return;
+ }
+
cairo_surface_flush (in);
in_pixels = cairo_image_surface_get_data (in);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]