ref: a874c7ecca00b9a2b228537685a5aa4427e00b99
parent: e0176397100a165776c3d28e03c2d4587433cad6
author: suzuki toshiya <[email protected]>
date: Sun Jul 4 08:08:41 EDT 2010
Check error value by `FT_CMap_New'. * src/cff/cffobjs.c (cff_face_init): Check error value by `FT_CMap_New'. * src/pfr/pfrobjs.c (pfr_face_init): Ditto. * src/type1/t1jobjs.c (T1_Face_Init): Ditto. * src/type42/t42jobjs.c (T42_Face_Init): Ditto.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-07-04 suzuki toshiya <[email protected]>
+
+ Check error value by `FT_CMap_New'.
+
+ * src/cff/cffobjs.c (cff_face_init): Check error value by
+ `FT_CMap_New'.
+ * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
+ * src/type1/t1jobjs.c (T1_Face_Init): Ditto.
+ * src/type42/t42jobjs.c (T42_Face_Init): Ditto.
+
2010-07-03 Werner Lemberg <[email protected]>
Make ftgrays.c compile stand-alone again.
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -887,7 +887,10 @@
nn = (FT_UInt)cffface->num_charmaps;
- FT_CMap_New( &FT_CFF_CMAP_UNICODE_CLASS_REC_GET, NULL, &cmaprec, NULL );
+ error = FT_CMap_New( &FT_CFF_CMAP_UNICODE_CLASS_REC_GET, NULL,
+ &cmaprec, NULL );
+ if ( error )
+ goto Exit;
/* if no Unicode charmap was previously selected, select this one */
if ( cffface->charmap == NULL && nn != (FT_UInt)cffface->num_charmaps )
@@ -921,7 +924,7 @@
clazz = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET;
}
- FT_CMap_New( clazz, NULL, &cmaprec, NULL );
+ error = FT_CMap_New( clazz, NULL, &cmaprec, NULL );
}
}
}
--- a/src/pfr/pfrobjs.c
+++ b/src/pfr/pfrobjs.c
@@ -256,7 +256,7 @@
charmap.encoding_id = 1;
charmap.encoding = FT_ENCODING_UNICODE;
- FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );
+ error = FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );
#if 0
/* Select default charmap */
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -498,7 +498,9 @@
charmap.encoding_id = 1;
charmap.encoding = FT_ENCODING_UNICODE;
- FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
+ error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
+ if ( error )
+ goto Exit;
/* now, generate an Adobe Standard encoding when appropriate */
charmap.platform_id = 7;
@@ -535,7 +537,7 @@
}
if ( clazz )
- FT_CMap_New( clazz, NULL, &charmap, NULL );
+ error = FT_CMap_New( clazz, NULL, &charmap, NULL );
#if 0
/* Select default charmap */
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -334,7 +334,9 @@
charmap.encoding_id = 1;
charmap.encoding = FT_ENCODING_UNICODE;
- FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
+ error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
+ if ( error )
+ goto Exit;
/* now, generate an Adobe Standard encoding when appropriate */
charmap.platform_id = 7;
@@ -371,7 +373,7 @@
}
if ( clazz )
- FT_CMap_New( clazz, NULL, &charmap, NULL );
+ error = FT_CMap_New( clazz, NULL, &charmap, NULL );
#if 0
/* Select default charmap */