[librsvg] 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] feTile: don't divide by zero if the input surface has empty bounds
- Date: Thu, 6 Jul 2017 18:07:27 +0000 (UTC)
commit 6a94a7aa4f722bd08f7b677900d0329309ed029f
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 804d637..bd6c8f2 100644
--- a/rsvg-filter.c
+++ b/rsvg-filter.c
@@ -4947,6 +4947,11 @@ rsvg_filter_primitive_tile_render (RsvgNode *node, RsvgFilterPrimitive *primitiv
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]