freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] [type42] Avoid some memory zeroing.


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] [type42] Avoid some memory zeroing.
Date: Fri, 21 May 2021 02:21:17 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

3 changed files:

Changes:

  • ChangeLog
    1
    +2021-05-20  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    2
    +
    
    3
    +	[type42] Avoid some memory zeroing.
    
    4
    +
    
    5
    +	* src/type42/t42objs.c (T42_Open_Face): Tweak allocation macro.
    
    6
    +	* src/type42/t42parse.c (t42_parse_sfnts): Ditto.
    
    7
    +
    
    1 8
     2021-05-19  Nikolaus Waxweiler  <madigens@gmail.com>
    
    2 9
     
    
    3 10
     	[CMake] Update dependency finders.
    

  • src/type42/t42objs.c
    ... ... @@ -44,7 +44,7 @@
    44 44
     
    
    45 45
         parser = &loader.parser;
    
    46 46
     
    
    47
    -    if ( FT_ALLOC( face->ttf_data, 12 ) )
    
    47
    +    if ( FT_QALLOC( face->ttf_data, 12 ) )
    
    48 48
           goto Exit;
    
    49 49
     
    
    50 50
         /* while parsing the font we always update `face->ttf_size' so that */
    

  • src/type42/t42parse.c
    ... ... @@ -614,7 +614,7 @@
    614 614
               error = FT_THROW( Invalid_File_Format );
    
    615 615
               goto Fail;
    
    616 616
             }
    
    617
    -        if ( FT_REALLOC( string_buf, old_string_size, string_size ) )
    
    617
    +        if ( FT_QREALLOC( string_buf, old_string_size, string_size ) )
    
    618 618
               goto Fail;
    
    619 619
     
    
    620 620
             allocated = 1;
    
    ... ... @@ -718,7 +718,7 @@
    718 718
                   goto Fail;
    
    719 719
                 }
    
    720 720
     
    
    721
    -            if ( FT_REALLOC( face->ttf_data, 12, face->ttf_size ) )
    
    721
    +            if ( FT_QREALLOC( face->ttf_data, 12, face->ttf_size ) )
    
    722 722
                   goto Fail;
    
    723 723
               }
    
    724 724
               /* fall through */
    
    ... ... @@ -767,8 +767,8 @@
    767 767
                 FT_TRACE2(( "  allocating %ld bytes\n", face->ttf_size + 1 ));
    
    768 768
                 FT_TRACE2(( "\n" ));
    
    769 769
     
    
    770
    -            if ( FT_REALLOC( face->ttf_data, 12 + 16 * num_tables,
    
    771
    -                             face->ttf_size + 1 ) )
    
    770
    +            if ( FT_QREALLOC( face->ttf_data, 12 + 16 * num_tables,
    
    771
    +                              face->ttf_size + 1 ) )
    
    772 772
                   goto Fail;
    
    773 773
               }
    
    774 774
               /* fall through */
    


  • reply via email to

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