[type1] Fix Savannah bug #36386.

* src/type1/t1load.c (t1_load_keyword): Ignore keyword if context is
not valid.
This commit is contained in:
Werner Lemberg 2012-05-07 11:24:48 +02:00
parent 448d128ec5
commit 8dc17bb47b
2 changed files with 26 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2012-05-07 Werner Lemberg <wl@gnu.org>
[type1] Fix Savannah bug #36386.
* src/type1/t1load.c (t1_load_keyword): Ignore keyword if context is
not valid.
2012-04-07 Werner Lemberg <wl@gnu.org>
Remove compiler warning.

View File

@ -1011,13 +1011,24 @@
max_objects = 0;
}
if ( field->type == T1_FIELD_TYPE_INTEGER_ARRAY ||
field->type == T1_FIELD_TYPE_FIXED_ARRAY )
error = T1_Load_Field_Table( &loader->parser, field,
objects, max_objects, 0 );
if ( *objects )
{
if ( field->type == T1_FIELD_TYPE_INTEGER_ARRAY ||
field->type == T1_FIELD_TYPE_FIXED_ARRAY )
error = T1_Load_Field_Table( &loader->parser, field,
objects, max_objects, 0 );
else
error = T1_Load_Field( &loader->parser, field,
objects, max_objects, 0 );
}
else
error = T1_Load_Field( &loader->parser, field,
objects, max_objects, 0 );
{
FT_TRACE1(( "t1_load_keyword: ignoring keyword `%s'"
" which is not valid at this point\n"
" (probably due to missing keywords)\n",
field->ident ));
error = T1_Err_Ok;
}
Exit:
return error;
@ -1970,8 +1981,8 @@
if ( !( dict & keyword->dict ) )
{
FT_TRACE1(( "parse_dict: found %s but ignoring it "
"since it is in the wrong dictionary\n",
FT_TRACE1(( "parse_dict: found `%s' but ignoring it"
" since it is in the wrong dictionary\n",
keyword->ident ));
break;
}