diff options
author | Alexei Podtelezhnikov <apodtele@gmail.com> | 2022-06-12 09:04:13 -0400 |
---|---|---|
committer | Alexei Podtelezhnikov <apodtele@gmail.com> | 2022-06-12 09:04:13 -0400 |
commit | 8b6bcc92c5907cfad9e20b1b7bfaef96e2d93ebf (patch) | |
tree | 39f20a79c8bb7ee11056e7b57f11f7258fa9cf28 | |
parent | e7482ff4c2a39e0e6bcf32b90ccfbfdd0f8ef5e6 (diff) | |
download | freetype2-8b6bcc92c5907cfad9e20b1b7bfaef96e2d93ebf.tar.gz |
* src/sfnt/sfwoff2.c (woff2_open_font): Partial revert.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47981.
-rw-r--r-- | src/sfnt/sfwoff2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sfnt/sfwoff2.c b/src/sfnt/sfwoff2.c index fd9674deb..049a142a8 100644 --- a/src/sfnt/sfwoff2.c +++ b/src/sfnt/sfwoff2.c @@ -2004,7 +2004,8 @@ FT_TRACE4(( "Number of fonts in TTC: %d\n", woff2.num_fonts )); - if ( FT_QNEW_ARRAY( woff2.ttc_fonts, woff2.num_fonts ) ) + /* pre-zero pointers within in case of failure */ + if ( FT_NEW_ARRAY( woff2.ttc_fonts, woff2.num_fonts ) ) goto Exit; for ( nn = 0; nn < woff2.num_fonts; nn++ ) |