[base] Fix calls to `FT_Stream_Seek'. * src/base/ftobjs.c (Mac_Read_sfnt_Resource, FT_Open_Face): Set `error'.
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
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,