Commit 39356621 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(ftfont_otf_features): Fix indexing

gsub_gpos->FeatureList.Feature.  Check the validity of indices.
parent 2de17c73
2008-10-17 Kenichi Handa <handa@m17n.org>
* ftfont.c (ftfont_otf_features): Fix indexing
gsub_gpos->FeatureList.Feature. Check the validity of indices.
2008-10-16 Magnus Henoch <mange@freemail.hu>
 
* dbusbind.c (Fdbus_call_method): Unbreak usage line.
......
......@@ -1340,7 +1340,7 @@ ftfont_otf_features (gsub_gpos)
OTF_GSUB_GPOS *gsub_gpos;
{
Lisp_Object scripts, langsyses, features, sym;
int i, j, k;
int i, j, k, l;
for (scripts = Qnil, i = gsub_gpos->ScriptList.ScriptCount - 1; i >= 0; i--)
{
......@@ -1359,7 +1359,10 @@ ftfont_otf_features (gsub_gpos)
for (features = Qnil, k = otf_langsys->FeatureCount - 1; k >= 0; k--)
{
OTF_TAG_SYM (sym, gsub_gpos->FeatureList.Feature[k].FeatureTag);
l = otf_langsys->FeatureIndex[k];
if (l > gsub_gpos->FeatureList.FeatureCount)
continue;
OTF_TAG_SYM (sym, gsub_gpos->FeatureList.Feature[l].FeatureTag);
features = Fcons (sym, features);
}
if (j >= 0)
......
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