OTF_NameRecord->ascii. If possible, convert Unicode sequence to
ASCII.
(read_name_table): Adjusted for the change of read_name.
(read_cmap_table): Signal an error (not-yet-supported) if format
is 2. Support for formats, 8, 10, 12.
(read_value_record): Clear value_record at first.
(read_lookup_subtable_gpos): Fix for the case subFormat is 1 and
2.
(OTF_open): Check file name extension.
void *errret = NULL;
OTF *otf;
OTF_InternalData *internal_data;
-
+ int len = strlen (otf_name);
+ const char *ext = otf_name + (len - 4);
+
+ if (len < 4
+ || ext[0] != '.'
+ || (ext[1] != 'O' && ext[1] != 'T' && ext[1] != 'o' && ext[1] != 't')
+ || (ext[2] != 'T' && ext[2] != 't')
+ || (ext[3] != 'F' && ext[3] != 'f'))
+ OTF_ERROR (OTF_ERROR_FILE, otf_name);
fp = fopen (otf_name, "r");
if (! fp)
OTF_ERROR (OTF_ERROR_FILE, otf_name);