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}.
This commit is contained in:
suzuki toshiya 2014-11-28 16:05:59 +09:00
parent 46d4dc86e1
commit 348fffa850
2 changed files with 11 additions and 2 deletions

View File

@ -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..

View File

@ -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",