From 23c093fc38326d98a58dd482ed6afa4b02d2a004 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Fri, 21 Nov 2014 08:41:39 +0100 Subject: [PATCH] Minor. --- src/base/ftobjs.c | 1 + src/pfr/pfrsbit.c | 2 +- src/sfnt/pngshim.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index cc561054a..315ad129c 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -4107,6 +4107,7 @@ FT_Bitmap_New( &bitmap ); + /* this also converts the bitmap flow to `down' (i.e., pitch > 0) */ err = FT_Bitmap_Convert( library, &slot->bitmap, &bitmap, 1 ); if ( !err ) { diff --git a/src/pfr/pfrsbit.c b/src/pfr/pfrsbit.c index 2da150070..eb7507f3f 100644 --- a/src/pfr/pfrsbit.c +++ b/src/pfr/pfrsbit.c @@ -59,7 +59,7 @@ if ( !decreasing ) { - writer->line += writer->pitch * ( target->rows-1 ); + writer->line += writer->pitch * ( target->rows - 1 ); writer->pitch = -writer->pitch; } } diff --git a/src/sfnt/pngshim.c b/src/sfnt/pngshim.c index cfa64812d..9bfcc2a77 100644 --- a/src/sfnt/pngshim.c +++ b/src/sfnt/pngshim.c @@ -276,6 +276,7 @@ goto DestroyExit; } + /* this doesn't overflow: 0x7FFF * 0x7FFF * 4 < 2^32 */ size = map->rows * map->pitch; error = ft_glyphslot_alloc_bitmap( slot, size );