Commit c69891a1345640096fbf396e8dd567fe879ce233

suzuki toshiya 2010-06-25T09:02:18

Initial fix for Savannah bug #30248 and #30249. * src/base/ftobjs.c (Mac_Read_POST_Resource): Check the error during reading a PFB fragment embedded in LaserWriter PS font for Macintosh. Reported by Robert Swiecki.

diff --git a/ChangeLog b/ChangeLog
index 5119c6d..6669597 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-06-25  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+
+	Initial fix for Savannah bug #30248 and #30249.
+
+	* src/base/ftobjs.c (Mac_Read_POST_Resource): Check the error during
+	reading a PFB fragment embedded in LaserWriter PS font for Macintosh.
+	Reported by Robert Swiecki.
+
 2010-06-24  Werner Lemberg  <wl@gnu.org>
 
 	Fix Savannah bug #30247.
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 17fa820..32d4417 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1574,6 +1574,8 @@
       }
 
       error = FT_Stream_Read( stream, (FT_Byte *)pfb_data + pfb_pos, rlen );
+      if ( error )
+        goto Exit2;
       pfb_pos += rlen;
     }