ref: 38b349c41b2456d533cf60fb966a32d1a665dc8f
parent: de9faa53edadecf05311f8bac0466674814644c1
author: Alexei Podtelezhnikov <apodtele@gmail.com>
date: Mon Oct 18 16:35:28 EDT 2021
[pcf] Zero out the allocated properties. Fallout reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40033 * src/pcf/pcfread.c (pcf_get_properties): Use FT_NEW_ARRAY and zero out `properties` in case of failure.
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -613,7 +613,8 @@
strings[string_size] = '\0';
- if ( FT_QNEW_ARRAY( properties, nprops ) )
+ /* zero out in case of failure */
+ if ( FT_NEW_ARRAY( properties, nprops ) )
goto Bail;
face->properties = properties;