freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] 3 commits: [woff2] Avoid some memory ze


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] 3 commits: [woff2] Avoid some memory zeroing.
Date: Sat, 01 May 2021 13:23:30 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

5 changed files:

Changes:

  • ChangeLog
    1
    +2021-05-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    2
    +
    
    3
    +	* src/sfnt/pngshim.c (Load_SBit_Png): Tweak allocaton macro.
    
    4
    +
    
    5
    +2021-05-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    6
    +
    
    7
    +	[truetype] Avoid some memory zeroing.
    
    8
    +
    
    9
    +	* src/truetype/ttinterp.c (Init_Context): Tweak allocation macro.
    
    10
    +	* src/truetype/ttpload.c (tt_face_load_cvt): Ditto. 
    
    11
    +
    
    12
    +2021-05-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    13
    +
    
    14
    +	[woff2] Avoid some memory zeroing.
    
    15
    +
    
    16
    +	* src/sfnt/sfwoff2.c (store_loca, woff2_open_font): Tweak macros.
    
    17
    +
    
    1 18
     2021-04-30  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    2 19
     
    
    3 20
     	* src/gzip/ftgzip.c (ft_gzip_alloc): Zero out memory again.
    

  • src/sfnt/pngshim.c
    ... ... @@ -430,7 +430,7 @@
    430 430
             goto DestroyExit;
    
    431 431
         }
    
    432 432
     
    
    433
    -    if ( FT_NEW_ARRAY( rows, imgHeight ) )
    
    433
    +    if ( FT_QNEW_ARRAY( rows, imgHeight ) )
    
    434 434
         {
    
    435 435
           error = FT_THROW( Out_Of_Memory );
    
    436 436
           goto DestroyExit;
    

  • src/sfnt/sfwoff2.c
    ... ... @@ -795,7 +795,7 @@
    795 795
           goto Fail;
    
    796 796
     
    
    797 797
         loca_buf_size = loca_values_size * offset_size;
    
    798
    -    if ( FT_NEW_ARRAY( loca_buf, loca_buf_size ) )
    
    798
    +    if ( FT_QNEW_ARRAY( loca_buf, loca_buf_size ) )
    
    799 799
           goto Fail;
    
    800 800
     
    
    801 801
         dst = loca_buf;
    
    ... ... @@ -2123,8 +2123,8 @@
    2123 2123
     
    
    2124 2124
     
    
    2125 2125
           /* Create a temporary array. */
    
    2126
    -      if ( FT_NEW_ARRAY( temp_indices,
    
    2127
    -                         ttc_font->num_tables ) )
    
    2126
    +      if ( FT_QNEW_ARRAY( temp_indices,
    
    2127
    +                          ttc_font->num_tables ) )
    
    2128 2128
             goto Exit;
    
    2129 2129
     
    
    2130 2130
           FT_TRACE4(( "Storing tables for TTC face index %d.\n", face_index ));
    
    ... ... @@ -2132,9 +2132,9 @@
    2132 2132
             temp_indices[nn] = indices[ttc_font->table_indices[nn]];
    
    2133 2133
     
    
    2134 2134
           /* Resize array to required size. */
    
    2135
    -      if ( FT_RENEW_ARRAY( indices,
    
    2136
    -                           woff2.num_tables,
    
    2137
    -                           ttc_font->num_tables ) )
    
    2135
    +      if ( FT_QRENEW_ARRAY( indices,
    
    2136
    +                            woff2.num_tables,
    
    2137
    +                            ttc_font->num_tables ) )
    
    2138 2138
             goto Exit;
    
    2139 2139
     
    
    2140 2140
           for ( nn = 0; nn < ttc_font->num_tables; nn++ )
    

  • src/truetype/ttinterp.c
    ... ... @@ -306,7 +306,7 @@
    306 306
         exec->memory   = memory;
    
    307 307
         exec->callSize = 32;
    
    308 308
     
    
    309
    -    if ( FT_NEW_ARRAY( exec->callStack, exec->callSize ) )
    
    309
    +    if ( FT_QNEW_ARRAY( exec->callStack, exec->callSize ) )
    
    310 310
           goto Fail_Memory;
    
    311 311
     
    
    312 312
         /* all values in the context are set to 0 already, but this is */
    

  • src/truetype/ttpload.c
    ... ... @@ -347,7 +347,7 @@
    347 347
     
    
    348 348
         face->cvt_size = table_len / 2;
    
    349 349
     
    
    350
    -    if ( FT_NEW_ARRAY( face->cvt, face->cvt_size ) )
    
    350
    +    if ( FT_QNEW_ARRAY( face->cvt, face->cvt_size ) )
    
    351 351
           goto Exit;
    
    352 352
     
    
    353 353
         if ( FT_FRAME_ENTER( face->cvt_size * 2L ) )
    


  • reply via email to

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