[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master 38b349c: [pcf] Zero out the allocated properties.
From: |
Werner Lemberg |
Subject: |
[freetype2] master 38b349c: [pcf] Zero out the allocated properties. |
Date: |
Mon, 18 Oct 2021 20:42:11 -0400 (EDT) |
branch: master
commit 38b349c41b2456d533cf60fb966a32d1a665dc8f
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>
[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.
---
src/pcf/pcfread.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index 4c6823a..e60a0a5 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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master 38b349c: [pcf] Zero out the allocated properties.,
Werner Lemberg <=