From 639a02154b36fea925a145061138385164932c4c Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 11 Jan 2022 09:14:48 +0100 Subject: [PATCH] * 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 --- src/type42/t42objs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c index 03955e945..53fe9b233 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 */