[gegl] long-shadow: fix buffer overflow; add "needs-alpha" key
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] long-shadow: fix buffer overflow; add "needs-alpha" key
- Date: Mon, 30 Jul 2018 18:08:44 +0000 (UTC)
commit d13895edc11fcd1c88a404a6401e2b9dc41d45e4
Author: Ell <ell_se yahoo com>
Date: Mon Jul 30 13:58:10 2018 -0400
long-shadow: fix buffer overflow; add "needs-alpha" key
operations/workshop/long-shadow.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/operations/workshop/long-shadow.c b/operations/workshop/long-shadow.c
index 0ac702072..6438815f0 100644
--- a/operations/workshop/long-shadow.c
+++ b/operations/workshop/long-shadow.c
@@ -701,12 +701,9 @@ init_buffers (Context *ctx,
else
{
ctx->input_row0 = ctx->input_row + 4 * (ctx->area.width - 1);
- ctx->output_row0 = ctx->output_row + 4 * (ctx->area.width - 1);
+ ctx->output_row0 = ctx->output_row + 4 * (ctx->roi.width - 1);
ctx->row_step = -4;
-
- if (ctx->output_row == ctx->input_row)
- ctx->output_row0 -= 4 * (ctx->roi.x - ctx->area.x);
}
if (ctx->options.style == GEGL_LONG_SHADOW_STYLE_FINITE)
@@ -1099,6 +1096,7 @@ gegl_op_class_init (GeglOpClass *klass)
"name", "gegl:long-shadow",
"title", _("Long Shadow"),
"categories", "light",
+ "needs-alpha", "true",
"description", _("Creates a long-shadow effect"),
NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]