[sfnt] Improve handling of invalid post 2.5 tables [#49393].

* src/sfnt/ttpost.c (load_format_25): We need at least a single
table entry.
This commit is contained in:
Werner Lemberg 2016-10-22 18:34:48 +02:00
parent 7eeaf986b5
commit 577414030a
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2016-10-22 Werner Lemberg <wl@gnu.org>
[sfnt] Improve handling of invalid post 2.5 tables [#49393].
* src/sfnt/ttpost.c (load_format_25): We need at least a single
table entry.
2016-10-14 Werner Lemberg <wl@gnu.org>
[truetype] Fix handling of `cvar' table data.

View File

@ -326,7 +326,9 @@
goto Exit;
/* check the number of glyphs */
if ( num_glyphs > face->max_profile.numGlyphs || num_glyphs > 258 )
if ( num_glyphs > face->max_profile.numGlyphs ||
num_glyphs > 258 ||
num_glyphs < 1 )
{
error = FT_THROW( Invalid_File_Format );
goto Exit;