Commit d57f227121ef8e31872a5e7cfe2d10a46c81db46

Werner Lemberg 2015-09-26T08:44:26

* src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.

diff --git a/ChangeLog b/ChangeLog
index 5732e45..9e9c7bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-26  Werner Lemberg  <wl@gnu.org>
+
+	* src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
+
 2015-09-25  Werner Lemberg  <wl@gnu.org>
 
 	[type1] Protect against invalid number of glyphs (#46029).
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index f58f715..5d28252 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1776,7 +1776,7 @@
       goto Exit;
     if ( rlen == -1 )
       return FT_THROW( Cannot_Open_Resource );
-    if ( rlen > FT_MAC_RFORK_MAX_LEN )
+    if ( (FT_ULong)rlen > FT_MAC_RFORK_MAX_LEN )
       return FT_THROW( Invalid_Offset );
 
     error = open_face_PS_from_sfnt_stream( library,