[librsvg/librsvg-2.44] (#343): Handle child being in error in feComponentTransfer
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/librsvg-2.44] (#343): Handle child being in error in feComponentTransfer
- Date: Wed, 26 Sep 2018 12:21:53 +0000 (UTC)
commit 8a6eff86f8313d698afe56c8b98ac3e1fc1f4db9
Author: Ivan Molodetskikh <yalterz gmail com>
Date: Tue Sep 25 11:34:54 2018 +0300
(#343): Handle child being in error in feComponentTransfer
https://gitlab.gnome.org/GNOME/librsvg/issues/343
rsvg_internals/src/filters/component_transfer.rs | 9 +++++++++
.../render-crash/343-feComponentTransfer-child-in-error.svg | 9 +++++++++
2 files changed, 18 insertions(+)
---
diff --git a/rsvg_internals/src/filters/component_transfer.rs
b/rsvg_internals/src/filters/component_transfer.rs
index 7dc7c10b..863a5f34 100644
--- a/rsvg_internals/src/filters/component_transfer.rs
+++ b/rsvg_internals/src/filters/component_transfer.rs
@@ -309,6 +309,15 @@ impl Filter for ComponentTransfer {
let func_b = get_node(Channel::B);
let func_a = get_node(Channel::A);
+ for node in [&func_r, &func_g, &func_b, &func_a]
+ .iter()
+ .filter_map(|x| x.as_ref())
+ {
+ if node.is_in_error() {
+ return Err(FilterError::ChildNodeInError);
+ }
+ }
+
// This is the default node that performs an identity transformation.
let func_default = FuncX::default();
diff --git a/tests/fixtures/render-crash/343-feComponentTransfer-child-in-error.svg
b/tests/fixtures/render-crash/343-feComponentTransfer-child-in-error.svg
new file mode 100644
index 00000000..e6991a2f
--- /dev/null
+++ b/tests/fixtures/render-crash/343-feComponentTransfer-child-in-error.svg
@@ -0,0 +1,9 @@
+<svg>
+ <filter id="f">
+ <feComponentTransfer>
+ <feFuncR type="table" tableValues="@"/>
+ </feComponentTransfer>
+ </filter>
+
+ <text filter="url(#f)">0</text>
+</svg>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]