1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

(ftfont_otf_features): Fix indexing

gsub_gpos->FeatureList.Feature.  Check the validity of indices.
This commit is contained in:
Kenichi Handa 2008-10-17 02:20:31 +00:00
parent 2de17c73f3
commit 393566216f
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,8 @@
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.

View File

@ -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)