Fix Savannah bug #36829. * src/type1/t1load.c (parse_encoding): Check cursor position after call to T1_Skip_PS_Token.
diff --git a/ChangeLog b/ChangeLog
index 72f3419..6b09d2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-07-13 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #36829.
+
+ * src/type1/t1load.c (parse_encoding): Check cursor position after
+ call to T1_Skip_PS_Token.
+
2012-07-11 Alexei Podtelezhnikov <apodtele@gmail.com>
[ftstroke] Fix uninitialized return value.
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 7313fef..c830f1b 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1293,6 +1293,8 @@
parser->root.cursor = cur;
T1_Skip_PS_Token( parser );
+ if ( parser->root.cursor >= limit )
+ return;
if ( parser->root.error )
return;