freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] * src/truetype/ttgxvar.c (tt_set_mm_ble


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype][master] * src/truetype/ttgxvar.c (tt_set_mm_blend): Test `coords`.
Date: Thu, 01 Jul 2021 05:02:49 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

2 changed files:

Changes:

  • ChangeLog
    1
    +2021-07-01  Ben Wagner  <bungeman@chromium.org>
    
    2
    +
    
    3
    +	* src/truetype/ttgxvar.c (tt_set_mm_blend): Test `coords`.
    
    4
    +
    
    5
    +	It is undefined behavior to pass `NULL` to `memcpy`.  `coords' is
    
    6
    +	passed to `memcpy` but `TT_Get_MM_Blend` and `TT_Get_Var_Design`
    
    7
    +	explictly call `tt_set_mm_blend` with `coords` as `NULL`.  In
    
    8
    +	addition, `TT_Set_MM_Blend` has a similar possible issue.
    
    9
    +
    
    1 10
     2021-06-30  Dominik Röttsches  <drott@chromium.org>
    
    2 11
     
    
    3 12
     	[sfnt] Support PaintScale in 'COLR' v1 parsing.
    

  • src/truetype/ttgxvar.c
    ... ... @@ -2663,9 +2663,10 @@
    2663 2663
         }
    
    2664 2664
     
    
    2665 2665
         blend->num_axis = mmvar->num_axis;
    
    2666
    -    FT_MEM_COPY( blend->normalizedcoords,
    
    2667
    -                 coords,
    
    2668
    -                 num_coords * sizeof ( FT_Fixed ) );
    
    2666
    +    if ( coords )
    
    2667
    +      FT_MEM_COPY( blend->normalizedcoords,
    
    2668
    +                   coords,
    
    2669
    +                   num_coords * sizeof ( FT_Fixed ) );
    
    2669 2670
     
    
    2670 2671
         if ( set_design_coords )
    
    2671 2672
           ft_var_to_design( face,
    


  • reply via email to

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