ref: b43e0f4413b2aafb88be8cb3fb7aaa84ac0b9102
parent: 649c673a8fc1795536c5b9a48503568d9e2a75c6
author: Werner Lemberg <[email protected]>
date: Sat Mar 17 03:42:43 EDT 2012
[type1] Fix Savannah bug #35847. * src/type1/t1load.c (parse_subrs): Fix the loop exit condition; we want to exit when we have run out of data.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,13 @@
+2012-03-17 Chris Liddell <[email protected]>
+
+ [type1] Fix Savannah bug #35847.
+
+ * src/type1/t1load.c (parse_subrs): Fix the loop exit condition;
+ we want to exit when we have run out of data.
+
2012-03-16 Werner Lemberg <[email protected]>
- [bdf] Really fix 35658.
+ [bdf] Really fix Savannah bug #35658.
* src/bdf/bdflib.c (_bdf_list_split): Add one more `field' initializer.
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1399,9 +1399,10 @@
FT_Byte* base;
- /* If the next token isn't `dup' we are done. */
- if ( parser->root.cursor + 4 < parser->root.limit &&
- ft_strncmp( (char*)parser->root.cursor, "dup", 3 ) != 0 )
+ /* If we are out of data, or if the next token isn't `dup', */
+ /* we are done. */
+ if ( parser->root.cursor + 4 >= parser->root.limit ||
+ ft_strncmp( (char*)parser->root.cursor, "dup", 3 ) != 0 )
break;
T1_Skip_PS_Token( parser ); /* `dup' */