mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
actions: Fix missing argument length check
Resolves #14192 In procedure_commands_get_display_args (), one section missed a check for the argument array length before trying to access the index. This caused a crash if there were not enough arguments sent in for a Script-fu plug-in. This patch adds that array length check to prevent the crash.
This commit is contained in:
parent
20fb40f7d7
commit
6192b79d89
1 changed files with 2 additions and 2 deletions
|
@ -289,14 +289,14 @@ procedure_commands_get_display_args (GimpProcedure *procedure,
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
else if (GIMP_IS_PARAM_SPEC_CORE_OBJECT_ARRAY (procedure->args[n_args]))
|
||||
else if (gimp_value_array_length (args) > n_args &&
|
||||
GIMP_IS_PARAM_SPEC_CORE_OBJECT_ARRAY (procedure->args[n_args]))
|
||||
{
|
||||
GimpDrawable **drawables = NULL;
|
||||
gint n_drawables;
|
||||
GList *iter;
|
||||
gint i;
|
||||
|
||||
|
||||
n_drawables = g_list_length (drawables_list);
|
||||
|
||||
drawables = g_new0 (GimpDrawable *, n_drawables + 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue