Commit bebc7b11c52c00e8edfaf2ba38ca25d135404a1c

Werner Lemberg 2007-06-01T06:32:30

* src/cid/cidparse.c (cid_parser_new): Don't continue second search pass for `StartData' if an error has occurred.

diff --git a/ChangeLog b/ChangeLog
index 2b9e797..af8e5a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-01  Werner Lemberg  <wl@gnu.org>
+
+	* src/cid/cidparse.c (cid_parser_new): Don't continue second search
+	pass for `StartData' if an error has occurred.
+
 2007-05-30  Werner Lemberg  <wl@gnu.org>
 
 	* src/type1/t1load.c (parse_subrs, parse_charstrings): Protect
diff --git a/src/cid/cidparse.c b/src/cid/cidparse.c
index c2381fa..29e45f9 100644
--- a/src/cid/cidparse.c
+++ b/src/cid/cidparse.c
@@ -165,7 +165,10 @@
     while ( cur < limit )
     {
       if ( parser->root.error )
-        break;
+      {
+        error = parser->root.error;
+        goto Exit;
+      }
 
       if ( cur[0] == 'S' && ft_strncmp( (char*)cur, "StartData", 9 ) == 0 )
       {