* src/sfnt/sfwoff2.c (woff2_open_font): Check `num_fonts' for TTCs.
Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18494
This commit is contained in:
parent
0a3d2bb99b
commit
b75031a26e
@ -1,3 +1,11 @@
|
||||
2019-10-25 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/sfnt/sfwoff2.c (woff2_open_font): Check `num_fonts' for TTCs.
|
||||
|
||||
Reported as
|
||||
|
||||
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18494
|
||||
|
||||
2019-10-22 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/sfnt/sfwoff2.c (woff2_open_font): Avoid undefined shift.
|
||||
|
@ -1948,6 +1948,12 @@
|
||||
if ( READ_255USHORT( woff2.num_fonts ) )
|
||||
goto Exit;
|
||||
|
||||
if ( !woff2.num_fonts )
|
||||
{
|
||||
error = FT_THROW( Invalid_Table );
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
FT_TRACE4(( "Number of fonts in TTC: %ld\n", woff2.num_fonts ));
|
||||
|
||||
if ( FT_NEW_ARRAY( woff2.ttc_fonts, woff2.num_fonts ) )
|
||||
|
Loading…
Reference in New Issue
Block a user