Commit 2d4005f2 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

clamp the pixpipe dimension to the allowed range. Fixes bug #137902.

2004-03-22  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpparasiteio.c (gimp_pixpipe_params_parse): clamp
	the pixpipe dimension to the allowed range. Fixes bug #137902.
parent db2dfce4
2004-03-22 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpparasiteio.c (gimp_pixpipe_params_parse): clamp
the pixpipe dimension to the allowed range. Fixes bug #137902.
2004-03-22 Sven Neumann <sven@gimp.org>
* app/text/gimptextlayer.c (gimp_text_layer_duplicate): put some
......@@ -64,8 +64,8 @@ void
gimp_pixpipe_params_parse (gchar *string,
GimpPixPipeParams *params)
{
gchar *p, *q, *r; /* Don't you love single-char identifiers? */
gint i; /* No, we don't!! <Sven> */
gchar *p, *q, *r;
gint i;
q = string;
while ((p = strtok (q, " \r\n")) != NULL)
......@@ -88,8 +88,11 @@ gimp_pixpipe_params_parse (gchar *string,
else if (strcmp (p, "dim") == 0)
{
if (r)
params->dim = atoi (r + 1);
}
{
params->dim = atoi (r + 1);
params->dim = CLAMP (params->dim, 1, GIMP_PIXPIPE_MAXDIM);
}
}
else if (strcmp (p, "cols") == 0)
{
if (r)
......@@ -148,7 +151,7 @@ gchar *
gimp_pixpipe_params_build (GimpPixPipeParams *params)
{
GString *s = g_string_new (NULL);
gchar *str;
gchar *str;
gint i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment