* src/sfnt/sfobjs.c (sfnt_load_face): Check error code after loading `cmap'.
diff --git a/ChangeLog b/ChangeLog
index aedeb3a..1cb255f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-28 Victor Stinner <victor.stinner@inl.fr>
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Check error code after loading
+ `cmap'.
+
2007-04-27 Werner Lemberg <wl@gnu.org>
* src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check for negative
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index cc90110..3d12996 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -575,7 +575,10 @@
/* the following tables are often not present in embedded TrueType */
/* fonts within PDF documents, so don't check for them. */
LOAD_( maxp );
+
LOAD_( cmap );
+ if ( error )
+ goto Exit;
/* the following tables are optional in PCL fonts -- */
/* don't check for errors */