Commit e02a40a4f8754774c8dccc01aeb0f07ea58e81c7

Werner Lemberg 2023-05-08T20:12:26

* src/cff/cffdrivr.c (cff_glyph_load): Fix guard for `size`. This was forgotten to change in commit 2b54eba36b (in May 2004). Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58739

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index 3d08f8d..7ee26a9 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -181,7 +181,7 @@
     if ( load_flags & FT_LOAD_NO_SCALE )
       size = NULL;
 
-    if ( cffsize )
+    if ( size )
     {
       /* these two objects must have the same parent */
       if ( size->face != slot->face )