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.
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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
diff --git a/ChangeLog b/ChangeLog
index 189b79b..0b4b436 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ 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 <wl@gnu.org>
Make ftgrays.c compile stand-alone again.
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index 4dc78bc..f7b5e8b 100644
--- 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 );
}
}
}
diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c
index 40b1463..73afb59 100644
--- 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 */
diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c
index b1de687..1183b42 100644
--- 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 */
diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c
index 9081ffc..de88465 100644
--- 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 */