+2008-04-03 Jason Rumney <jasonr@gnu.org>
+
+ * w32uniscribe.c (uniscribe_check_otf): Sanity check otf_spec.
+
2008-04-03 Kenichi Handa <handa@m17n.org>
* coding.c (CATEGORY_MASK_ANY): Add CATEGORY_MASK_UTF_16_AUTO.
DWORD table;
int i, retval = 0;
+ /* Check the spec is in the right format. */
+ if (!CONSP (otf_spec) || Flength (val) < 3)
+ return 0;
+
/* Break otf_spec into its components. */
script = XCAR (otf_spec);
rest = XCDR (otf_spec);
if (NILP (features[i]))
continue;
+ /* If features is not a cons, this font spec is messed up. */
+ if (!CONSP (features[i]))
+ goto no_support;
+
/* Read GPOS/GSUB header. */
OTF_INT16_VAL (tbl, 4, &scriptlist_table);
OTF_INT16_VAL (tbl, 6, &feature_table);