In fcfreetype.c, `GetScriptTags`: fix `use_of_uninitialized_value` and return the correct number of parsed tags in case the font file contains less tags than indicated.
This commit is contained in:
parent
06929a556f
commit
89af138176
|
@ -2762,9 +2762,9 @@ GetScriptTags(FT_Face face, FT_ULong tabletag, FT_ULong **stags)
|
||||||
goto Fail;
|
goto Fail;
|
||||||
|
|
||||||
/* sort the tag list before returning it */
|
/* sort the tag list before returning it */
|
||||||
qsort(*stags, script_count, sizeof(FT_ULong), compareulong);
|
qsort(*stags, p, sizeof(FT_ULong), compareulong);
|
||||||
|
|
||||||
return script_count;
|
return p;
|
||||||
|
|
||||||
Fail:
|
Fail:
|
||||||
free(*stags);
|
free(*stags);
|
||||||
|
|
Loading…
Reference in New Issue