* src/type1/t1parse.c (T1_Get_Private_Dict): Skip exactly one CR, LF, or CR/LF after `eexec'.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
diff --git a/ChangeLog b/ChangeLog
index 867c3bd..58ce231 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-01-20 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1parse.c (T1_Get_Private_Dict): Skip exactly one
+ CR, LF, or CR/LF after `eexec'.
+
2004-01-18 David Turner <david@freetype.org>
* src/sfnt/ttsbit.c: removed compiler warning
@@ -31,7 +36,6 @@
introducing the new FT_ARRAY_COPY and FT_ARRAY_MOVE macros
to make copying arrays easier
-
2004-01-14 Werner Lemberg <wl@gnu.org>
* src/cff/cffload.c (cff_font_load): Load charstrings_index earlier.
diff --git a/src/type1/t1parse.c b/src/type1/t1parse.c
index cc0c2f3..885d60a 100644
--- a/src/type1/t1parse.c
+++ b/src/type1/t1parse.c
@@ -356,8 +356,22 @@
parser->root.limit = parser->base_dict + parser->base_len;
T1_Skip_PS_Token( parser );
- T1_Skip_Spaces ( parser );
cur = parser->root.cursor;
+ if ( *cur == '\r' )
+ {
+ cur++;
+ if ( *cur == '\n' )
+ cur++;
+ }
+ else if ( *cur == '\n' )
+ cur++;
+ else
+ {
+ FT_ERROR(( "T1_Get_Private_Dict:" ));
+ FT_ERROR(( " `eexec' not properly terminated\n" ));
+ error = T1_Err_Invalid_File_Format;
+ goto Exit;
+ }
size = (FT_Long)( parser->base_len - ( cur - parser->base_dict ) );