summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Podtelezhnikov <apodtele@gmail.com>2022-01-08 22:28:44 -0500
committerAlexei Podtelezhnikov <apodtele@gmail.com>2022-01-08 22:28:44 -0500
commitca0111289498f3f6ce28b3d78ff5a54ccdfd2d47 (patch)
tree83348bb906fba674cd5bd1763ae75cc8082b7542
parent7a493e3a404cd04ad2d798e985d7441bd2d955ea (diff)
downloadfreetype2-ca0111289498f3f6ce28b3d78ff5a54ccdfd2d47.tar.gz
[sfnt] Fix off-by-one error.
The 0-base index is equal to the number of previosly parsed entries. It is an error to adjust it by one to get the number truncated by a stream error. This is probably inconsequential because valid entries are correctly accounted for. * src/sfnt/ttload.c (check_table_dir): Do not adjust the truncated number of tables.
-rw-r--r--src/sfnt/ttload.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 51416d80b..97e47f8d4 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -205,7 +205,6 @@
if ( FT_STREAM_READ_FIELDS( table_dir_entry_fields, &table ) )
{
- nn--;
FT_TRACE2(( "check_table_dir:"
" can read only %d table%s in font (instead of %d)\n",
nn, nn == 1 ? "" : "s", sfnt->num_tables ));