diff options
author | Werner Lemberg <wl@gnu.org> | 2015-02-22 20:42:49 +0100 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2015-02-22 20:42:49 +0100 |
commit | b0ebcdc8e4f39a2dbf5c4e28b9ae787b26ff3dc0 (patch) | |
tree | 8ca8cb99c08f7f038155b8aebf3848f5a94c6e28 /src/sfnt/ttpost.c | |
parent | 22b1d5ca6772b155eaad79b0e0b406e308bd0d86 (diff) | |
download | freetype2-b0ebcdc8e4f39a2dbf5c4e28b9ae787b26ff3dc0.tar.gz |
* src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
Bug introduced 6 commits earlier.
Diffstat (limited to 'src/sfnt/ttpost.c')
-rw-r--r-- | src/sfnt/ttpost.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c index 804fd0e26..bf13a5c8d 100644 --- a/src/sfnt/ttpost.c +++ b/src/sfnt/ttpost.c @@ -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 ) || |