summaryrefslogtreecommitdiff
path: root/src/smooth
diff options
context:
space:
mode:
authorAlexei Podtelezhnikov <apodtele@gmail.com>2017-09-30 14:28:58 -0400
committerAlexei Podtelezhnikov <apodtele@gmail.com>2017-09-30 14:28:58 -0400
commitc8d8e15803b0881809b3e15309795f8705471c32 (patch)
treed9407c5b70df86d48a185cbbf426b6ed3df84ddf /src/smooth
parentc26f7f975b5f7f58f2b6da3d3308e3915f757a6f (diff)
downloadfreetype2-c8d8e15803b0881809b3e15309795f8705471c32.tar.gz
Signedness fixes in bitmap presetting.
Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3514. * src/raster/ftrend1.c (ft_raster1_render): Exlicitly signed height. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Explicitly unsigned subtraction.
Diffstat (limited to 'src/smooth')
-rw-r--r--src/smooth/ftsmooth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c
index 7946f28bb..db3a1c31d 100644
--- a/src/smooth/ftsmooth.c
+++ b/src/smooth/ftsmooth.c
@@ -141,9 +141,9 @@
x_shift = 64 * -slot->bitmap_left;
y_shift = 64 * -slot->bitmap_top;
if ( bitmap->pixel_mode == FT_PIXEL_MODE_LCD_V )
- y_shift += 64 * bitmap->rows / 3;
+ y_shift += 64 * (FT_Int)bitmap->rows / 3;
else
- y_shift += 64 * bitmap->rows;
+ y_shift += 64 * (FT_Int)bitmap->rows;
if ( origin )
{