freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] [woff2] Remove sfnt size guess check


From: Ben Wagner (@bungeman)
Subject: [Git][freetype/freetype][master] [woff2] Remove sfnt size guess check
Date: Fri, 14 Jul 2023 16:04:23 +0000

Ben Wagner pushed to branch master at FreeType / FreeType

Commits:

  • 85167dbd
    by Ben Wagner at 2023-07-14T14:52:20+00:00
    [woff2] Remove sfnt size guess check
    
    In WOFF the `totalSfntSize` must be correct, however in WOFF2 this value
    is now just a hint and a conforming implementation must not reject
    otherwise valid data if the `totalSfntSize` turns out not to be exact.
    
    * src/sfnt/sfwoff2.c (woff2_open_font): remove check that uncompressed
    woff2 data would fit in the sfnt size guess.
    
    Fixes: #1235
    

1 changed file:

Changes:

  • src/sfnt/sfwoff2.c
    ... ... @@ -2257,13 +2257,6 @@
    2257 2257
           goto Exit;
    
    2258 2258
         }
    
    2259 2259
     
    
    2260
    -    if ( woff2.uncompressed_size > sfnt_size )
    
    2261
    -    {
    
    2262
    -      FT_ERROR(( "woff2_open_font: SFNT table lengths are too large.\n" ));
    
    2263
    -      error = FT_THROW( Invalid_Table );
    
    2264
    -      goto Exit;
    
    2265
    -    }
    
    2266
    -
    
    2267 2260
         /* Allocate memory for uncompressed table data. */
    
    2268 2261
         if ( FT_QALLOC( uncompressed_buf, woff2.uncompressed_size ) ||
    
    2269 2262
              FT_FRAME_ENTER( woff2.totalCompressedSize )            )
    


  • reply via email to

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