diff options
author | Alexei Podtelezhnikov <apodtele@gmail.com> | 2021-10-18 20:35:28 -0400 |
---|---|---|
committer | Alexei Podtelezhnikov <apodtele@gmail.com> | 2021-10-18 20:35:28 -0400 |
commit | 38b349c41b2456d533cf60fb966a32d1a665dc8f (patch) | |
tree | b6d9d707b58cf16eebc1ee273a29285d84badb4d /src/pcf | |
parent | de9faa53edadecf05311f8bac0466674814644c1 (diff) | |
download | freetype2-38b349c41b2456d533cf60fb966a32d1a665dc8f.tar.gz |
[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.
Diffstat (limited to 'src/pcf')
-rw-r--r-- | src/pcf/pcfread.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c index 4c6823ac2..e60a0a514 100644 --- a/src/pcf/pcfread.c +++ b/src/pcf/pcfread.c @@ -613,7 +613,8 @@ THE SOFTWARE. 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; |