Mercurial > emacs
changeset 93604:5476a4f5d2f2
(uniscribe_check_otf): Sanity check otf_spec.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Thu, 03 Apr 2008 15:38:10 +0000 |
parents | 40e064117c8a |
children | 801b1941be60 |
files | src/w32uniscribe.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/w32uniscribe.c Thu Apr 03 13:42:25 2008 +0000 +++ b/src/w32uniscribe.c Thu Apr 03 15:38:10 2008 +0000 @@ -564,6 +564,10 @@ 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 @@ 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);