Commit 348fffa8509629b2c68f2438ece9e020861a0c36

suzuki toshiya 2014-11-28T16:05:59

Fix compiler warning to the comparison between signed and unsigned variable. * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix the comparison between `ypos + ysize' and FT_INT_{MAX,MIN}.

diff --git a/ChangeLog b/ChangeLog
index 2baff98..8f455c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2014-11-28  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+
+	Fix compiler warning to the comparison between signed and
+	unsigned variable.
+
+	* src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix the comparison
+	between `ypos + ysize' and FT_INT_{MAX,MIN}.
+
 2014-11-27  Werner Lemberg  <wl@gnu.org>
 
 	[docmaker] Replace empty `<td>' with CSS..
diff --git a/src/pfr/pfrsbit.c b/src/pfr/pfrsbit.c
index cc4a9c9..979bf78 100644
--- a/src/pfr/pfrsbit.c
+++ b/src/pfr/pfrsbit.c
@@ -636,8 +636,9 @@
        *      which causes a size truncation, because truncated
        *      size properties makes bitmap glyph broken.
        */
-      if ( xpos > FT_INT_MAX || ( ypos + ysize ) > FT_INT_MAX ||
-           xpos < FT_INT_MIN || ( ypos + ysize ) < FT_INT_MIN )
+      if ( xpos > FT_INT_MAX  || xpos < FT_INT_MIN         ||
+           ysize > FT_INT_MAX || ypos + ysize > FT_INT_MAX ||
+           ypos + (FT_Long)ysize < FT_INT_MIN )
       {
         FT_TRACE1(( "pfr_slot_load_bitmap:" ));
         FT_TRACE1(( "huge bitmap glyph %dx%d over FT_GlyphSlot\n",