[librsvg] gitlab#193 - Don't crash when feConvolveMatrix doesn't specify orderx/ordery



commit f39a7f82d1be5fe78a8c103c01a7f1153fc3a8b5
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Feb 1 13:53:11 2018 -0600

    gitlab#193 - Don't crash when feConvolveMatrix doesn't specify orderx/ordery
    
    We were not initializing the default values correctly, so
    rsvg_css_parse_number_list() would assert as it would get passed 0 for
    the expected length of the list.
    
    https://gitlab.gnome.org/GNOME/librsvg/issues/193

 rsvg-filter.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/rsvg-filter.c b/rsvg-filter.c
index 0434285..3223f63 100644
--- a/rsvg-filter.c
+++ b/rsvg-filter.c
@@ -1378,6 +1378,8 @@ rsvg_new_filter_primitive_convolve_matrix (const char *element_name, RsvgNode *p
     filter->super.result = g_string_new ("none");
     filter->KernelMatrix = NULL;
     filter->divisor = 0;
+    filter->orderx = 3; /* https://www.w3.org/TR/SVG/filters.html#feConvolveMatrixElementOrderAttribute */
+    filter->ordery = 3;
     filter->bias = 0;
     filter->dx = 0;
     filter->dy = 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]