freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] 2 commits: * src/base/ftstream.c (FT_St


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] 2 commits: * src/base/ftstream.c (FT_Stream_ReadFields): Update condition.
Date: Fri, 02 Aug 2024 01:19:13 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

  • 72e199e8
    by Alexei Podtelezhnikov (Алексей Подтележников) at 2024-08-01T21:12:41-04:00
    * src/base/ftstream.c (FT_Stream_ReadFields): Update condition.
    
  • a48cddde
    by Alexei Podtelezhnikov (Алексей Подтележников) at 2024-08-01T21:15:46-04:00
    * src/winfonts/winfnt.c (fnt_face_get_dll_font): Unwrap arithmetic.
    

2 changed files:

Changes:

  • src/base/ftstream.c
    ... ... @@ -763,10 +763,10 @@
    763 763
           case ft_frame_bytes:  /* read a byte sequence */
    
    764 764
           case ft_frame_skip:   /* skip some bytes      */
    
    765 765
             {
    
    766
    -          FT_UInt  len = fields->size;
    
    766
    +          FT_Int  len = fields->size;
    
    767 767
     
    
    768 768
     
    
    769
    -          if ( cursor + len > stream->limit )
    
    769
    +          if ( len > stream->limit - cursor )
    
    770 770
               {
    
    771 771
                 error = FT_THROW( Invalid_Stream_Operation );
    
    772 772
                 goto Exit;
    

  • src/winfonts/winfnt.c
    ... ... @@ -359,8 +359,8 @@
    359 359
               if ( type_id == 0x8008U )
    
    360 360
               {
    
    361 361
                 font_count  = count;
    
    362
    -            font_offset = FT_STREAM_POS() + 4 +
    
    363
    -                          (FT_ULong)( stream->cursor - stream->limit );
    
    362
    +            font_offset = FT_STREAM_POS() + 4 -
    
    363
    +                          (FT_ULong)( stream->limit - stream->cursor );
    
    364 364
                 break;
    
    365 365
               }
    
    366 366
     
    


  • reply via email to

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