freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] [pshinter] Avoid accessing uninitialize


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] [pshinter] Avoid accessing uninitialized zone.
Date: Sat, 15 Jan 2022 23:05:22 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

1 changed file:

Changes:

  • src/pshinter/pshalgo.c
    ... ... @@ -2110,14 +2110,17 @@
    2110 2110
           FT_Fixed  old_x_scale = x_scale;
    
    2111 2111
           FT_Fixed  old_y_scale = y_scale;
    
    2112 2112
     
    
    2113
    -      FT_Fixed  scaled;
    
    2114
    -      FT_Fixed  fitted;
    
    2113
    +      FT_Fixed  scaled = 0;
    
    2114
    +      FT_Fixed  fitted = 0;
    
    2115 2115
     
    
    2116 2116
           FT_Bool  rescale = FALSE;
    
    2117 2117
     
    
    2118 2118
     
    
    2119
    -      scaled = FT_MulFix( globals->blues.normal_top.zones->org_ref, y_scale );
    
    2120
    -      fitted = FT_PIX_ROUND( scaled );
    
    2119
    +      if ( globals->blues.normal_top.count )
    
    2120
    +      {
    
    2121
    +        scaled = FT_MulFix( globals->blues.normal_top.zones->org_ref, y_scale );
    
    2122
    +        fitted = FT_PIX_ROUND( scaled );
    
    2123
    +      }
    
    2121 2124
     
    
    2122 2125
           if ( fitted != 0 && scaled != fitted )
    
    2123 2126
           {
    


  • reply via email to

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