Commit 0c2bdb01a2e1d24a3e592377a6d0822856e10df2

Werner Lemberg 2022-03-19T09:37:28

* src/base/ftobjs.c (FT_Request_Size): Guard `face->size`. Fixes #1140.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 6492a15..282c912 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -3409,6 +3409,9 @@
     if ( !face )
       return FT_THROW( Invalid_Face_Handle );
 
+    if ( !face->size )
+      return FT_THROW( Invalid_Size_Handle );
+
     if ( !req || req->width < 0 || req->height < 0 ||
          req->type >= FT_SIZE_REQUEST_TYPE_MAX )
       return FT_THROW( Invalid_Argument );