Commit 4099281f6e9b5339b56ee76263fa77e5a7126fe7

Werner Lemberg 2015-12-14T07:51:25

[base] Fix calls to `FT_Stream_Seek'. * src/base/ftobjs.c (Mac_Read_sfnt_Resource, FT_Open_Face): Set `error'.

diff --git a/ChangeLog b/ChangeLog
index 1c7c3c5..a80daf9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,11 @@
-2015-12-10  Ben Wagner <bungeman@gmail.com>
+2015-12-14  Werner Lemberg  <wl@gnu.org>
+
+	[base] Fix calls to `FT_Stream_Seek'.
+
+	* src/base/ftobjs.c (Mac_Read_sfnt_Resource, FT_Open_Face): Set
+	`error'.
+
+2015-12-14  Ben Wagner <bungeman@gmail.com>
 
 	[base] Check error when seeking to data supplied offset (#46635).
 
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 58ff091..96572bd 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1803,7 +1803,8 @@
       goto Exit;
 
     /* rewind sfnt stream before open_face_PS_from_sfnt_stream() */
-    if ( FT_Stream_Seek( stream, flag_offset + 4 ) )
+    error = FT_Stream_Seek( stream, flag_offset + 4 );
+    if ( error )
       goto Exit;
 
     if ( FT_ALLOC( sfnt_data, rlen ) )
@@ -2184,7 +2185,8 @@
                FT_ERR_EQ( error, Table_Missing )                        )
           {
             /* TrueType but essential tables are missing */
-            if ( FT_Stream_Seek( stream, 0 ) )
+            error = FT_Stream_Seek( stream, 0 );
+            if ( error )
               break;
 
             error = open_face_PS_from_sfnt_stream( library,