[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
This commit is contained in:
Ben Wagner 2023-07-13 16:49:34 -04:00
parent 26a7f0478b
commit 85167dbd50
1 changed files with 0 additions and 7 deletions

View File

@ -2257,13 +2257,6 @@
goto Exit;
}
if ( woff2.uncompressed_size > sfnt_size )
{
FT_ERROR(( "woff2_open_font: SFNT table lengths are too large.\n" ));
error = FT_THROW( Invalid_Table );
goto Exit;
}
/* Allocate memory for uncompressed table data. */
if ( FT_QALLOC( uncompressed_buf, woff2.uncompressed_size ) ||
FT_FRAME_ENTER( woff2.totalCompressedSize ) )