Commit 639a02154b36fea925a145061138385164932c4c

Werner Lemberg 2022-01-11T09:14:48

* src/type42/t42objs.c (T42_Open_Face): Avoid use of uninitialized memory. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43508

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c
index 03955e9..53fe9b2 100644
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -44,7 +44,8 @@
 
     parser = &loader.parser;
 
-    if ( FT_QALLOC( face->ttf_data, 12 ) )
+    /* To handle buggy fonts we don't use `FT_QALLOC` here. */
+    if ( FT_ALLOC( face->ttf_data, 12 ) )
       goto Exit;
 
     /* while parsing the font we always update `face->ttf_size' so that */