diff options
author | Vitaly Lysenkov <vlysenkov@google.com> | 2023-02-21 20:13:23 +0000 |
---|---|---|
committer | Vitaly Lysenkov <vlysenkov@google.com> | 2023-02-21 20:13:23 +0000 |
commit | 89af138176855891d8cf3582253e511e5705c3be (patch) | |
tree | c00acdda313ab5c1fcedc2ee2166038c6ddaae24 | |
parent | 06929a556fdc39c8fe12965b69070c8df520a33e (diff) | |
download | fontconfig-89af138176855891d8cf3582253e511e5705c3be.tar.gz |
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.
-rw-r--r-- | src/fcfreetype.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fcfreetype.c b/src/fcfreetype.c index cf923f2..8ae88bd 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -2762,9 +2762,9 @@ GetScriptTags(FT_Face face, FT_ULong tabletag, FT_ULong **stags) goto Fail; /* 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: free(*stags); |