summaryrefslogtreecommitdiff
path: root/src/sfnt/sfwoff2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sfnt/sfwoff2.c')
-rw-r--r--src/sfnt/sfwoff2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sfnt/sfwoff2.c b/src/sfnt/sfwoff2.c
index 9beb01f65..bea73c388 100644
--- a/src/sfnt/sfwoff2.c
+++ b/src/sfnt/sfwoff2.c
@@ -1975,6 +1975,13 @@
goto Exit;
FT_TRACE6(( "%hu ", table_index ));
+ if ( table_index >= woff2.num_tables )
+ {
+ FT_ERROR(( "woff2_open_font: invalid table index\n" ));
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+
ttc_font->table_indices[j] = table_index;
table = indices[table_index];