Commit 6dc2f4b8 authored by sarah's avatar sarah

enhancement: validate reference argument of gimp_scanner_parse_string before using it

parent 348c9c22
......@@ -720,6 +720,13 @@ gimp_config_deserialize_object (GValue *value,
if (! gimp_scanner_parse_string (scanner, &type_name))
return G_TOKEN_STRING;
if (! (type_name && *type_name))
{
g_scanner_error (scanner, "Type name is empty");
g_free (type_name);
return G_TOKEN_ERROR;
}
type = g_type_from_name (type_name);
g_free (type_name);
......
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