silently accept arrays which are longer than specified. Nothing bad can

2004-10-25  Michael Natterer  <mitch@gimp.org>

	* plug-ins/script-fu/siod-wrapper.c (marshall_proc_db_call):
	silently accept arrays which are longer than specified. Nothing
	bad can happen and it's common practice to resize arrays in fixed
	size chunks so avoid frequent resizing. Fixes bug #155359.
This commit is contained in:
Michael Natterer 2004-10-25 20:42:06 +00:00 committed by Michael Natterer
parent 286eb01535
commit 0bff77801a
3 changed files with 18 additions and 10 deletions

View File

@ -1,7 +1,15 @@
2004-10-25 Michael Natterer <mitch@gimp.org>
* plug-ins/script-fu/siod-wrapper.c (marshall_proc_db_call):
silently accept arrays which are longer than specified. Nothing
bad can happen and it's common practice to resize arrays in fixed
size chunks so avoid frequent resizing. Fixes bug #155359.
2004-10-25 Michael Natterer <mitch@gimp.org>
* plug-ins/script-fu/siod-wrapper.c (init_constants): removed
debugging output i forgot.
(marshall_proc_db_call):
2004-10-25 Sven Neumann <sven@gimp.org>

View File

@ -646,7 +646,7 @@ marshall_proc_db_call (LISP a)
gint n_elements = args[i - 1].data.d_int32;
LISP list = car (a);
if (n_elements != nlength (list))
if (n_elements > nlength (list))
{
convert_string (proc_name);
g_snprintf (error_str, sizeof (error_str),
@ -670,7 +670,7 @@ marshall_proc_db_call (LISP a)
gint n_elements = args[i - 1].data.d_int32;
LISP list = car (a);
if (n_elements != nlength (list))
if (n_elements > nlength (list))
{
convert_string (proc_name);
g_snprintf (error_str, sizeof (error_str),
@ -694,7 +694,7 @@ marshall_proc_db_call (LISP a)
gint n_elements = args[i - 1].data.d_int32;
LISP list = car (a);
if (n_elements != nlength (list))
if (n_elements > nlength (list))
{
convert_string (proc_name);
g_snprintf (error_str, sizeof (error_str),
@ -717,7 +717,7 @@ marshall_proc_db_call (LISP a)
gint n_elements = args[i - 1].data.d_int32;
LISP list = car (a);
if (n_elements != nlength (list))
if (n_elements > nlength (list))
{
convert_string (proc_name);
g_snprintf (error_str, sizeof (error_str),
@ -741,7 +741,7 @@ marshall_proc_db_call (LISP a)
LISP list = car (a);
gint j;
if (n_elements != nlength (list))
if (n_elements > nlength (list))
{
convert_string (proc_name);
g_snprintf (error_str, sizeof (error_str),

View File

@ -646,7 +646,7 @@ marshall_proc_db_call (LISP a)
gint n_elements = args[i - 1].data.d_int32;
LISP list = car (a);
if (n_elements != nlength (list))
if (n_elements > nlength (list))
{
convert_string (proc_name);
g_snprintf (error_str, sizeof (error_str),
@ -670,7 +670,7 @@ marshall_proc_db_call (LISP a)
gint n_elements = args[i - 1].data.d_int32;
LISP list = car (a);
if (n_elements != nlength (list))
if (n_elements > nlength (list))
{
convert_string (proc_name);
g_snprintf (error_str, sizeof (error_str),
@ -694,7 +694,7 @@ marshall_proc_db_call (LISP a)
gint n_elements = args[i - 1].data.d_int32;
LISP list = car (a);
if (n_elements != nlength (list))
if (n_elements > nlength (list))
{
convert_string (proc_name);
g_snprintf (error_str, sizeof (error_str),
@ -717,7 +717,7 @@ marshall_proc_db_call (LISP a)
gint n_elements = args[i - 1].data.d_int32;
LISP list = car (a);
if (n_elements != nlength (list))
if (n_elements > nlength (list))
{
convert_string (proc_name);
g_snprintf (error_str, sizeof (error_str),
@ -741,7 +741,7 @@ marshall_proc_db_call (LISP a)
LISP list = car (a);
gint j;
if (n_elements != nlength (list))
if (n_elements > nlength (list))
{
convert_string (proc_name);
g_snprintf (error_str, sizeof (error_str),