freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master 535c67d 2/2: [mm] Tolerate missing Blend dictionary e


From: Werner Lemberg
Subject: [freetype2] master 535c67d 2/2: [mm] Tolerate missing Blend dictionary entries
Date: Mon, 25 Oct 2021 22:40:05 -0400 (EDT)

branch: master
commit 535c67dda712868b6b385d7b34f402e7201f0fd8
Author: Ben Wagner <bungeman@chromium.org>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>

    [mm] Tolerate missing Blend dictionary entries
    
    In a Multiple Master font, the Blend dictionary must contain valid
    Private, FontInfo, and FontBBox. The current code will error if any of
    these are present and invalid, but will not error and will provide
    uninitialized data if the Blend dictionary exists but does not contain
    one of these entries. This change reverts to the older behavior of
    treating any missing entries as containing all zero data and not
    returning an error.
    
    In the future it may be best to keep track of when these are actually
    initialized and error if they are not.
    
    * src/type1/t1load.c (t1_allocate_blend): Zero initiailize.
---
 src/type1/t1load.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 8fe16f4..5482dbd 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -133,9 +133,9 @@
 
 
         /* allocate the blend `private' and `font_info' dictionaries */
-        if ( FT_QNEW_ARRAY( blend->font_infos[1], num_designs ) ||
-             FT_QNEW_ARRAY( blend->privates  [1], num_designs ) ||
-             FT_QNEW_ARRAY( blend->bboxes    [1], num_designs ) )
+        if ( FT_NEW_ARRAY( blend->font_infos[1], num_designs ) ||
+             FT_NEW_ARRAY( blend->privates  [1], num_designs ) ||
+             FT_NEW_ARRAY( blend->bboxes    [1], num_designs ) )
           goto Exit;
 
         blend->font_infos[0] = &face->type1.font_info;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]