[gegl] gegl: in gegl-serialize avoid negative array on index on malformed input
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl: in gegl-serialize avoid negative array on index on malformed input
- Date: Mon, 18 May 2020 20:58:24 +0000 (UTC)
commit 8e74e54c33410c5f37620a3a6b7fc531f3c3a878
Author: Øyvind Kolås <pippin gimp org>
Date: Mon May 18 22:53:31 2020 +0200
gegl: in gegl-serialize avoid negative array on index on malformed input
Avoid crash that happens when ] brackets are present without first
having a proper opening bracket.
gegl/gegl-serialize.c | 1 +
operations/common/median-blur.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gegl/gegl-serialize.c b/gegl/gegl-serialize.c
index 7386d133b..0d8a59dac 100644
--- a/gegl/gegl-serialize.c
+++ b/gegl/gegl-serialize.c
@@ -370,6 +370,7 @@ gegl_create_chain_argv (char **argv,
else if (!strchr(*arg, '=') && strchr (*arg, ']'))
{
level--;
+ if (level < 0) level = 0;
gegl_node_connect_to (iter[level+1], "output", iter[level],
level_pad[level]);
}
diff --git a/operations/common/median-blur.c b/operations/common/median-blur.c
index 3d65f72e8..d2f787ca7 100644
--- a/operations/common/median-blur.c
+++ b/operations/common/median-blur.c
@@ -41,7 +41,7 @@ property_enum (neighborhood, _("Neighborhood"),
description (_("Neighborhood type"))
property_int (radius, _("Radius"), 3)
- value_range (-100, 100)
+ value_range (-400, 400)
ui_range (0, 100)
ui_meta ("unit", "pixel-distance")
description (_("Neighborhood radius, a negative value will calculate with inverted percentiles"))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]