mirror of https://github.com/GNOME/gimp.git
app/plug_in.c app/core/gimpbrush.c app/core/gimpbrushpipe.c
2001-09-03 Sven Neumann <sven@gimp.org> * app/plug_in.c * app/core/gimpbrush.c * app/core/gimpbrushpipe.c * app/core/gimpgradient.c * app/core/gimppalette.c * app/core/gimppattern.c: check strings from data files and plug-in registration for UTF-8 validity. There are probably a lot more places that need these checks. * plug-ins/common/gqbist.c: converted PDB texts to UTF-8.
This commit is contained in:
parent
4e9fcfa632
commit
083c7c9116
14
ChangeLog
14
ChangeLog
|
@ -1,4 +1,18 @@
|
|||
2001-09-03 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/plug_in.c
|
||||
* app/core/gimpbrush.c
|
||||
* app/core/gimpbrushpipe.c
|
||||
* app/core/gimpgradient.c
|
||||
* app/core/gimppalette.c
|
||||
* app/core/gimppattern.c: check strings from data files and plug-in
|
||||
registration for UTF-8 validity. There are probably a lot more places
|
||||
that need these checks.
|
||||
|
||||
* plug-ins/common/gqbist.c: converted PDB texts to UTF-8.
|
||||
|
||||
2001-08-31 Thomas Canty <tommydal@optushome.com.au>
|
||||
|
||||
* app/colormaps.c
|
||||
* app/gdisplay.c
|
||||
* app/nav_window.c
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -429,7 +429,7 @@ gimp_brush_load_brush (gint fd,
|
|||
GimpBrush *brush;
|
||||
gint bn_size;
|
||||
BrushHeader header;
|
||||
gchar *name;
|
||||
gchar *name = NULL;
|
||||
gint i;
|
||||
|
||||
g_return_val_if_fail (filename != NULL, NULL);
|
||||
|
@ -477,11 +477,18 @@ gimp_brush_load_brush (gint fd,
|
|||
g_free (name);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if (!g_utf8_validate (name, -1, NULL))
|
||||
{
|
||||
name = g_strdup (_("Unnamed"));
|
||||
g_message (_("Invalid UTF-8 string in GIMP brush file \"%s\"."),
|
||||
filename);
|
||||
g_free (name);
|
||||
name = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (!name)
|
||||
name = g_strdup (_("Unnamed"));
|
||||
|
||||
switch (header.bytes)
|
||||
{
|
||||
|
|
|
@ -429,7 +429,7 @@ gimp_brush_load_brush (gint fd,
|
|||
GimpBrush *brush;
|
||||
gint bn_size;
|
||||
BrushHeader header;
|
||||
gchar *name;
|
||||
gchar *name = NULL;
|
||||
gint i;
|
||||
|
||||
g_return_val_if_fail (filename != NULL, NULL);
|
||||
|
@ -477,11 +477,18 @@ gimp_brush_load_brush (gint fd,
|
|||
g_free (name);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if (!g_utf8_validate (name, -1, NULL))
|
||||
{
|
||||
name = g_strdup (_("Unnamed"));
|
||||
g_message (_("Invalid UTF-8 string in GIMP brush file \"%s\"."),
|
||||
filename);
|
||||
g_free (name);
|
||||
name = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (!name)
|
||||
name = g_strdup (_("Unnamed"));
|
||||
|
||||
switch (header.bytes)
|
||||
{
|
||||
|
|
|
@ -300,13 +300,23 @@ gimp_brush_pipe_load (const gchar *filename)
|
|||
if (buffer->len > 0 && buffer->len < 1024)
|
||||
{
|
||||
pipe = GIMP_BRUSH_PIPE (g_object_new (GIMP_TYPE_BRUSH_PIPE, NULL));
|
||||
|
||||
if (g_utf8_validate (buffer->str, buffer->len, NULL))
|
||||
{
|
||||
gimp_object_set_name (GIMP_OBJECT (pipe), buffer->str);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_message (_("Invalid UTF-8 string in GIMP brush file \"%s\"."),
|
||||
filename);
|
||||
gimp_object_set_name (GIMP_OBJECT (pipe), _("Unnamed"));
|
||||
}
|
||||
}
|
||||
g_string_free (buffer, TRUE);
|
||||
|
||||
if (!pipe)
|
||||
{
|
||||
g_message ("Couldn't read name for brush pipe from file '%s'\n",
|
||||
g_message ("Couldn't read name for brush pipe from file \"%s\".\n",
|
||||
filename);
|
||||
close (fd);
|
||||
return NULL;
|
||||
|
|
|
@ -300,13 +300,23 @@ gimp_brush_pipe_load (const gchar *filename)
|
|||
if (buffer->len > 0 && buffer->len < 1024)
|
||||
{
|
||||
pipe = GIMP_BRUSH_PIPE (g_object_new (GIMP_TYPE_BRUSH_PIPE, NULL));
|
||||
|
||||
if (g_utf8_validate (buffer->str, buffer->len, NULL))
|
||||
{
|
||||
gimp_object_set_name (GIMP_OBJECT (pipe), buffer->str);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_message (_("Invalid UTF-8 string in GIMP brush file \"%s\"."),
|
||||
filename);
|
||||
gimp_object_set_name (GIMP_OBJECT (pipe), _("Unnamed"));
|
||||
}
|
||||
}
|
||||
g_string_free (buffer, TRUE);
|
||||
|
||||
if (!pipe)
|
||||
{
|
||||
g_message ("Couldn't read name for brush pipe from file '%s'\n",
|
||||
g_message ("Couldn't read name for brush pipe from file \"%s\".\n",
|
||||
filename);
|
||||
close (fd);
|
||||
return NULL;
|
||||
|
|
|
@ -319,9 +319,18 @@ gimp_gradient_load (const gchar *filename)
|
|||
|
||||
fgets (line, 1024, file);
|
||||
if (! strncmp (line, "Name: ", strlen ("Name: ")))
|
||||
{
|
||||
if (g_utf8_validate (line, -1, NULL))
|
||||
{
|
||||
gimp_object_set_name (GIMP_OBJECT (gradient),
|
||||
g_strstrip (&line[strlen ("Name: ")]));
|
||||
}
|
||||
else
|
||||
{
|
||||
g_message (_("Invalid UTF-8 string in GIMP gradient file \"%s\"."),
|
||||
filename);
|
||||
gimp_object_set_name (GIMP_OBJECT (gradient), _("Unnamed"));
|
||||
}
|
||||
|
||||
fgets (line, 1024, file);
|
||||
}
|
||||
|
|
|
@ -300,9 +300,17 @@ gimp_palette_load (const gchar *filename)
|
|||
linenum++;
|
||||
|
||||
if (! strncmp (str, "Name: ", strlen ("Name: ")))
|
||||
{
|
||||
if (g_utf8_validate (str, -1, NULL))
|
||||
{
|
||||
gimp_object_set_name (GIMP_OBJECT (palette),
|
||||
g_strstrip (&str[strlen ("Name: ")]));
|
||||
}
|
||||
else
|
||||
{
|
||||
g_message (_("Invalid UTF-8 string in palette file '%s'"), filename);
|
||||
gimp_object_set_name (GIMP_OBJECT (palette), _("Unnamed"));
|
||||
}
|
||||
|
||||
if (! fgets (str, 1024, fp))
|
||||
{
|
||||
|
@ -487,7 +495,6 @@ gimp_palette_add_entry (GimpPalette *palette,
|
|||
{
|
||||
GimpPaletteEntry *entry;
|
||||
|
||||
g_return_val_if_fail (palette != NULL, NULL);
|
||||
g_return_val_if_fail (GIMP_IS_PALETTE (palette), NULL);
|
||||
|
||||
g_return_val_if_fail (color != NULL, NULL);
|
||||
|
@ -514,7 +521,6 @@ gimp_palette_delete_entry (GimpPalette *palette,
|
|||
GList *list;
|
||||
gint pos = 0;
|
||||
|
||||
g_return_if_fail (palette != NULL);
|
||||
g_return_if_fail (GIMP_IS_PALETTE (palette));
|
||||
|
||||
g_return_if_fail (entry != NULL);
|
||||
|
|
|
@ -300,9 +300,17 @@ gimp_palette_load (const gchar *filename)
|
|||
linenum++;
|
||||
|
||||
if (! strncmp (str, "Name: ", strlen ("Name: ")))
|
||||
{
|
||||
if (g_utf8_validate (str, -1, NULL))
|
||||
{
|
||||
gimp_object_set_name (GIMP_OBJECT (palette),
|
||||
g_strstrip (&str[strlen ("Name: ")]));
|
||||
}
|
||||
else
|
||||
{
|
||||
g_message (_("Invalid UTF-8 string in palette file '%s'"), filename);
|
||||
gimp_object_set_name (GIMP_OBJECT (palette), _("Unnamed"));
|
||||
}
|
||||
|
||||
if (! fgets (str, 1024, fp))
|
||||
{
|
||||
|
@ -487,7 +495,6 @@ gimp_palette_add_entry (GimpPalette *palette,
|
|||
{
|
||||
GimpPaletteEntry *entry;
|
||||
|
||||
g_return_val_if_fail (palette != NULL, NULL);
|
||||
g_return_val_if_fail (GIMP_IS_PALETTE (palette), NULL);
|
||||
|
||||
g_return_val_if_fail (color != NULL, NULL);
|
||||
|
@ -514,7 +521,6 @@ gimp_palette_delete_entry (GimpPalette *palette,
|
|||
GList *list;
|
||||
gint pos = 0;
|
||||
|
||||
g_return_if_fail (palette != NULL);
|
||||
g_return_if_fail (GIMP_IS_PALETTE (palette));
|
||||
|
||||
g_return_if_fail (entry != NULL);
|
||||
|
|
|
@ -300,9 +300,17 @@ gimp_palette_load (const gchar *filename)
|
|||
linenum++;
|
||||
|
||||
if (! strncmp (str, "Name: ", strlen ("Name: ")))
|
||||
{
|
||||
if (g_utf8_validate (str, -1, NULL))
|
||||
{
|
||||
gimp_object_set_name (GIMP_OBJECT (palette),
|
||||
g_strstrip (&str[strlen ("Name: ")]));
|
||||
}
|
||||
else
|
||||
{
|
||||
g_message (_("Invalid UTF-8 string in palette file '%s'"), filename);
|
||||
gimp_object_set_name (GIMP_OBJECT (palette), _("Unnamed"));
|
||||
}
|
||||
|
||||
if (! fgets (str, 1024, fp))
|
||||
{
|
||||
|
@ -487,7 +495,6 @@ gimp_palette_add_entry (GimpPalette *palette,
|
|||
{
|
||||
GimpPaletteEntry *entry;
|
||||
|
||||
g_return_val_if_fail (palette != NULL, NULL);
|
||||
g_return_val_if_fail (GIMP_IS_PALETTE (palette), NULL);
|
||||
|
||||
g_return_val_if_fail (color != NULL, NULL);
|
||||
|
@ -514,7 +521,6 @@ gimp_palette_delete_entry (GimpPalette *palette,
|
|||
GList *list;
|
||||
gint pos = 0;
|
||||
|
||||
g_return_if_fail (palette != NULL);
|
||||
g_return_if_fail (GIMP_IS_PALETTE (palette));
|
||||
|
||||
g_return_if_fail (entry != NULL);
|
||||
|
|
|
@ -312,11 +312,18 @@ gimp_pattern_load (const gchar *filename)
|
|||
g_message (_("Error in GIMP pattern file \"%s\"."), filename);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if (!g_utf8_validate (name, -1, NULL))
|
||||
{
|
||||
name = g_strdup (_("Unnamed"));
|
||||
g_message (_("Invalid UTF-8 string in GIMP pattern file \"%s\"."),
|
||||
filename);
|
||||
g_free (name);
|
||||
name = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (!name)
|
||||
name = g_strdup (_("Unnamed"));
|
||||
|
||||
pattern = GIMP_PATTERN (g_object_new (GIMP_TYPE_PATTERN, NULL));
|
||||
|
||||
|
|
|
@ -312,11 +312,18 @@ gimp_pattern_load (const gchar *filename)
|
|||
g_message (_("Error in GIMP pattern file \"%s\"."), filename);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if (!g_utf8_validate (name, -1, NULL))
|
||||
{
|
||||
name = g_strdup (_("Unnamed"));
|
||||
g_message (_("Invalid UTF-8 string in GIMP pattern file \"%s\"."),
|
||||
filename);
|
||||
g_free (name);
|
||||
name = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (!name)
|
||||
name = g_strdup (_("Unnamed"));
|
||||
|
||||
pattern = GIMP_PATTERN (g_object_new (GIMP_TYPE_PATTERN, NULL));
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
GSList *tmp = NULL;
|
||||
gchar *prog = NULL;
|
||||
gboolean add_proc_def;
|
||||
gboolean valid;
|
||||
gint i;
|
||||
|
||||
/* Argument checking
|
||||
|
@ -1926,7 +1927,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
if ((proc_install->params[i].type == GIMP_PDB_INT32ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_INT8ARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_FLOATARRAY ||
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY) &&
|
||||
proc_install->params[i].type == GIMP_PDB_STRINGARRAY)
|
||||
&&
|
||||
proc_install->params[i-1].type != GIMP_PDB_INT32)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
|
@ -1940,6 +1942,49 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sanity check strings for UTF-8 validity */
|
||||
valid = FALSE;
|
||||
|
||||
if ((proc_install->menu_path == NULL ||
|
||||
g_utf8_validate (proc_install->menu_path, -1, NULL)) &&
|
||||
(g_utf8_validate (proc_install->name, -1, NULL)) &&
|
||||
(proc_install->blurb == NULL ||
|
||||
g_utf8_validate (proc_install->blurb, -1, NULL)) &&
|
||||
(proc_install->help == NULL ||
|
||||
g_utf8_validate (proc_install->help, -1, NULL)) &&
|
||||
(proc_install->author == NULL ||
|
||||
g_utf8_validate (proc_install->author, -1, NULL)) &&
|
||||
(proc_install->copyright == NULL ||
|
||||
g_utf8_validate (proc_install->copyright, -1, NULL)) &&
|
||||
(proc_install->date == NULL ||
|
||||
g_utf8_validate (proc_install->date, -1, NULL)))
|
||||
{
|
||||
valid = TRUE;
|
||||
|
||||
for (i = 0; i < proc_install->nparams && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->params[i].name, -1, NULL) &&
|
||||
(proc_install->params[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->params[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
for (i = 0; i < proc_install->nreturn_vals && valid; i++)
|
||||
{
|
||||
if (! (g_utf8_validate (proc_install->return_vals[i].name, -1, NULL) &&
|
||||
(proc_install->return_vals[i].description == NULL ||
|
||||
g_utf8_validate (proc_install->return_vals[i].description, -1, NULL))))
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
g_message ("Plug-In \"%s\"\n(%s)\n"
|
||||
"attempted to install a procedure with invalid UTF-8 strings.\n",
|
||||
g_path_get_basename (current_plug_in->args[0]),
|
||||
current_plug_in->args[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
* Jörn Loviscach.
|
||||
*
|
||||
* It appeared in c't 10/95, page 326 and is called
|
||||
* "Ausgewürfelt - Moderne Kunst algorithmisch erzeugen".
|
||||
* (~modern art created with algorithms)
|
||||
* "Ausgewürfelt - Moderne Kunst algorithmisch erzeugen"
|
||||
* (~modern art created with algorithms).
|
||||
*
|
||||
* It generates one main formula (the middle button) and 8 variations of it.
|
||||
* If you select a variation it becomes the new main formula. If you
|
||||
|
@ -416,9 +416,9 @@ query (void)
|
|||
|
||||
gimp_install_procedure (PLUG_IN_NAME,
|
||||
"Create images based on a random genetic formula",
|
||||
"This Plug-in is based on an article by Jörn Loviscach (appeared in c't 10/95, page 326). It generates modern art pictures from a random genetic formula.",
|
||||
"Jörn Loviscach, Jens Ch. Restemeier",
|
||||
"Jörn Loviscach, Jens Ch. Restemeier",
|
||||
"This Plug-in is based on an article by Jörn Loviscach (appeared in c't 10/95, page 326). It generates modern art pictures from a random genetic formula.",
|
||||
"Jörn Loviscach, Jens Ch. Restemeier",
|
||||
"Jörn Loviscach, Jens Ch. Restemeier",
|
||||
PLUG_IN_VERSION,
|
||||
N_("<Image>/Filters/Render/Pattern/Qbist..."),
|
||||
"RGB*",
|
||||
|
|
Loading…
Reference in New Issue