* src/sfnt/ttpost.c (load_format_20): Fix error tracing message. Bug introduced 6 commits earlier.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
diff --git a/ChangeLog b/ChangeLog
index c06a10e..3c07838 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
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.
* src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c
index 804fd0e..bf13a5c 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 ) ||