* src/sfnt/ttpost.c (load_format_20): Fix error tracing message.

Bug introduced 6 commits earlier.
This commit is contained in:
Werner Lemberg 2015-02-22 20:42:49 +01:00
parent 22b1d5ca67
commit b0ebcdc8e4
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2015-02-22 Werner Lemberg <wl@gnu.org>
* src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
Bug introduced 6 commits earlier.
2015-02-22 Werner Lemberg <wl@gnu.org>
[pshinter] Fix thinko.

View File

@ -246,11 +246,14 @@
if ( len > post_limit ||
FT_STREAM_POS() > post_limit - len )
{
FT_Int d = post_limit - FT_STREAM_POS();
FT_ERROR(( "load_format_20:"
" exceeding string length (%d),"
" truncating at end of post table (%d byte left)\n",
len, post_limit - FT_STREAM_POS() ));
len = FT_MAX( 0, post_limit - FT_STREAM_POS() );
len, d ));
len = (FT_UInt)FT_MAX( 0, d );
}
if ( FT_NEW_ARRAY( name_strings[n], len + 1 ) ||