ref: f48aec7b1ec398b01220ad137b7e8d4e0f7aa036
parent: be183ebb5dada06b8be9948f03081e72ce0da1f5
author: Werner Lemberg <[email protected]>
date: Mon Jun 18 03:07:55 EDT 2007
* src/psaux/psobjs.c (ps_tofixedarray, ps_tocoordarray): Fix exit logic. (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>: Skip delimiters correctly. (ps_parser_load_field_table): Use `fields->array_max' instead of T1_MAX_TABLE_ELEMENTS to limit the number of arguments.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-06-18 Werner Lemberg <[email protected]>
+
+ * src/psaux/psobjs.c (ps_tofixedarray, ps_tocoordarray): Fix exit
+ logic.
+ (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>: Skip delimiters
+ correctly.
+ (ps_parser_load_field_table): Use `fields->array_max' instead of
+ T1_MAX_TABLE_ELEMENTS to limit the number of arguments.
+
2006-06-17 Werner Lemberg <[email protected]>
* src/tools/ftrandom.c (font_size): New global variable.
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -803,9 +803,6 @@
if ( cur >= limit )
goto Exit;
- if ( coords != NULL && count >= max_coords )
- break;
-
if ( *cur == ender )
{
cur++;
@@ -814,6 +811,9 @@
old_cur = cur;
+ if ( coords != NULL && count >= max_coords )
+ break;
+
/* call PS_Conv_ToFixed() even if coords == NULL */
/* to properly parse number at `cur' */
*( coords != NULL ? &coords[count] : &dummy ) =
@@ -881,9 +881,6 @@
if ( cur >= limit )
goto Exit;
- if ( values != NULL && count >= max_values )
- break;
-
if ( *cur == ender )
{
cur++;
@@ -892,6 +889,9 @@
old_cur = cur;
+ if ( values != NULL && count >= max_values )
+ break;
+
/* call PS_Conv_ToFixed() even if coords == NULL */
/* to properly parse number at `cur' */
*( values != NULL ? &values[count] : &dummy ) =
@@ -1182,7 +1182,7 @@
FT_Int result;
- result = ps_tofixedarray( &token.start, token.limit, 4, temp, 0 );
+ result = ps_tofixedarray( &cur, limit, 4, temp, 0 );
if ( result < 0 )
{
@@ -1254,8 +1254,8 @@
error = PSaux_Err_Ignore;
goto Exit;
}
- if ( num_elements > T1_MAX_TABLE_ELEMENTS )
- num_elements = T1_MAX_TABLE_ELEMENTS;
+ if ( (FT_UInt)num_elements > field->array_max )
+ num_elements = field->array_max;
old_cursor = parser->cursor;
old_limit = parser->limit;