summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Podtelezhnikov <apodtele@gmail.com>2017-08-25 21:40:01 -0400
committerAlexei Podtelezhnikov <apodtele@gmail.com>2017-08-25 21:40:01 -0400
commitf0898b9259d4b3b99a1e720924683730dd36d3db (patch)
tree11d76893b07c5a1edae340f88a9ef1d0936283fc
parent587264cfd528f2e8fbb180bc4798ad58d20ceb85 (diff)
downloadfreetype2-f0898b9259d4b3b99a1e720924683730dd36d3db.tar.gz
Swap `ALLOC_MULT' arguments (#51833).
* src/base/ftbitmap.c (ft_bitmap_assure_buffer): Updated. * src/winfonts/winfnt.c (FNT_Load_Glyph): Updated. * src/raster/ftrend1.c (ft_raster1_render): Updated.
-rw-r--r--ChangeLog8
-rw-r--r--src/base/ftbitmap.c2
-rw-r--r--src/raster/ftrend1.c2
-rw-r--r--src/winfonts/winfnt.c2
4 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c749f962..8d67fcb5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-08-25 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ Swap `ALLOC_MULT' arguments (#51833).
+
+ * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Updated.
+ * src/winfonts/winfnt.c (FNT_Load_Glyph): Updated.
+ * src/raster/ftrend1.c (ft_raster1_render): Updated.
+
2017-08-23 Werner Lemberg <wl@gnu.org>
[sfnt] Fix clang compilation (#51788).
diff --git a/src/base/ftbitmap.c b/src/base/ftbitmap.c
index 88c88c4c1..ee50c2f30 100644
--- a/src/base/ftbitmap.c
+++ b/src/base/ftbitmap.c
@@ -226,7 +226,7 @@
}
/* otherwise allocate new buffer */
- if ( FT_QALLOC_MULT( buffer, new_pitch, bitmap->rows + ypixels ) )
+ if ( FT_QALLOC_MULT( buffer, bitmap->rows + ypixels, new_pitch ) )
return error;
/* new rows get added at the top of the bitmap, */
diff --git a/src/raster/ftrend1.c b/src/raster/ftrend1.c
index e52ca1db5..185a7f6fc 100644
--- a/src/raster/ftrend1.c
+++ b/src/raster/ftrend1.c
@@ -189,7 +189,7 @@
bitmap->rows = height;
bitmap->pitch = (int)pitch;
- if ( FT_ALLOC_MULT( bitmap->buffer, pitch, height ) )
+ if ( FT_ALLOC_MULT( bitmap->buffer, height, pitch ) )
goto Exit;
slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
index 5cdb85a36..4c4796231 100644
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -1091,7 +1091,7 @@
/* note: since glyphs are stored in columns and not in rows we */
/* can't use ft_glyphslot_set_bitmap */
- if ( FT_ALLOC_MULT( bitmap->buffer, pitch, bitmap->rows ) )
+ if ( FT_ALLOC_MULT( bitmap->buffer, bitmap->rows, pitch ) )
goto Exit;
column = (FT_Byte*)bitmap->buffer;