summaryrefslogtreecommitdiff
path: root/pango/opentype/harfbuzz-gsub.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/opentype/harfbuzz-gsub.c')
-rw-r--r--pango/opentype/harfbuzz-gsub.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pango/opentype/harfbuzz-gsub.c b/pango/opentype/harfbuzz-gsub.c
index f504bf0e..c05f20db 100644
--- a/pango/opentype/harfbuzz-gsub.c
+++ b/pango/opentype/harfbuzz-gsub.c
@@ -1896,6 +1896,9 @@ static HB_Error Lookup_ContextSubst2( HB_GSUBHeader* gsub,
if ( error )
return error;
+ if (csf2->MaxContextLength < 1)
+ return HB_Err_Not_Covered;
+
if ( ALLOC_ARRAY( classes, csf2->MaxContextLength, HB_UShort ) )
return error;
@@ -3159,6 +3162,9 @@ static HB_Error Lookup_ChainContextSubst2( HB_GSUBHeader* gsub,
return error;
known_backtrack_classes = 0;
+ if (ccsf2->MaxInputLength < 1)
+ return HB_Err_Not_Covered;
+
if ( ALLOC_ARRAY( input_classes, ccsf2->MaxInputLength, HB_UShort ) )
goto End3;
known_input_classes = 1;