Commit 86a24621 authored by Manish Singh's avatar Manish Singh Committed by Manish Singh
Browse files

validate the types of the individual list members when passing parasites.

2004-01-28  Manish Singh  <yosh@gimp.org>

        * plug-ins/script-fu/siod-wrapper.c (marshall_proc_db_call): validate
        the types of the individual list members when passing parasites.
        Fixes #93806.
parent 27d43d86
2004-01-28 Manish Singh <yosh@gimp.org>
* plug-ins/script-fu/siod-wrapper.c (marshall_proc_db_call): validate
the types of the individual list members when passing parasites.
Fixes #93806.
2004-01-27 Manish Singh <yosh@gimp.org>
 
* app/paint-funcs/paint-funcs.c: inlined rotate_pointers, changed
......@@ -715,23 +715,47 @@ marshall_proc_db_call (LISP a)
if (success)
{
args[i].type = GIMP_PDB_PARASITE;
/* parasite->name */
intermediate_val = car (a);
if (!TYPEP (car (intermediate_val), tc_string))
{
success = FALSE;
break;
}
args[i].data.d_parasite.name =
get_c_string (car (intermediate_val));
/* parasite->flags */
intermediate_val = cdr (intermediate_val);
args[i].data.d_parasite.flags = get_c_long (car(intermediate_val));
if (!TYPEP (car (intermediate_val), tc_flonum))
{
success = FALSE;
break;
}
args[i].data.d_parasite.flags =
get_c_long (car (intermediate_val));
/* parasite->size */
intermediate_val = cdr (intermediate_val);
if (!TYPEP (car (intermediate_val), tc_string) &&
!TYPEP (car (intermediate_val), tc_byte_array))
{
success = FALSE;
break;
}
args[i].data.d_parasite.size =
(car (intermediate_val))->storage_as.string.dim;
/* parasite->data */
args[i].data.d_parasite.data =
(void*) (car (intermediate_val))->storage_as.string.data;
(car (intermediate_val))->storage_as.string.data;
}
break;
......
......@@ -715,23 +715,47 @@ marshall_proc_db_call (LISP a)
if (success)
{
args[i].type = GIMP_PDB_PARASITE;
/* parasite->name */
intermediate_val = car (a);
if (!TYPEP (car (intermediate_val), tc_string))
{
success = FALSE;
break;
}
args[i].data.d_parasite.name =
get_c_string (car (intermediate_val));
/* parasite->flags */
intermediate_val = cdr (intermediate_val);
args[i].data.d_parasite.flags = get_c_long (car(intermediate_val));
if (!TYPEP (car (intermediate_val), tc_flonum))
{
success = FALSE;
break;
}
args[i].data.d_parasite.flags =
get_c_long (car (intermediate_val));
/* parasite->size */
intermediate_val = cdr (intermediate_val);
if (!TYPEP (car (intermediate_val), tc_string) &&
!TYPEP (car (intermediate_val), tc_byte_array))
{
success = FALSE;
break;
}
args[i].data.d_parasite.size =
(car (intermediate_val))->storage_as.string.dim;
/* parasite->data */
args[i].data.d_parasite.data =
(void*) (car (intermediate_val))->storage_as.string.data;
(car (intermediate_val))->storage_as.string.data;
}
break;
......
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