[gegl] bin: avoid an use after free in completion engine
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] bin: avoid an use after free in completion engine
- Date: Tue, 16 Jul 2019 10:52:41 +0000 (UTC)
commit a51256eb1c2b764a89d00fd61dedb64c3fbd32f9
Author: Øyvind Kolås <pippin gimp org>
Date: Tue Jul 16 12:52:12 2019 +0200
bin: avoid an use after free in completion engine
bin/ui-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/bin/ui-core.c b/bin/ui-core.c
index 3a289e83e..7436986b7 100644
--- a/bin/ui-core.c
+++ b/bin/ui-core.c
@@ -4813,7 +4813,7 @@ static GList *commandline_get_completions (GeglNode *node,
char *tmp = g_strdup (commandline);
char *fragment;
char ** operations;
- char *found_op = NULL;
+ const char *found_op = NULL;
gint i;
guint n_operations;
/* the last fragment is what we're completing */
@@ -4839,7 +4839,7 @@ static GList *commandline_get_completions (GeglNode *node,
if (!strcmp (operations[i], fragment) ||
!strcmp (operations[i], prefixed_by_gegl))
{
- found_op = operations[i];
+ found_op = g_intern_string (operations[i]);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]