Commit 6b8aa22a authored by Jason Rumney's avatar Jason Rumney

(uniscribe_check_otf): Sanity check otf_spec.

parent cb7d9531
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.
......
......@@ -564,6 +564,10 @@ int uniscribe_check_otf (font, otf_spec)
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);
......@@ -609,6 +613,10 @@ int uniscribe_check_otf (font, 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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment