* src/base/ftbitmap.c (FT_Bitmap_Blend): Check target pitch. Problem reported by Sender Ghost <lightside@gmx.com>.
diff --git a/ChangeLog b/ChangeLog
index 290c865..78b82c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2019-04-22 Werner Lemberg <wl@gnu.org>
+ * src/base/ftbitmap.c (FT_Bitmap_Blend): Check target pitch.
+
+ Problem reported by Sender Ghost <lightside@gmx.com>.
+
+2019-04-22 Werner Lemberg <wl@gnu.org>
+
Fix return value of `FT_Set_Named_Instance' (#56186).
* src/truetype/ttgxvar.c (TT_Set_Named_Instance): Correctly handle
diff --git a/src/base/ftbitmap.c b/src/base/ftbitmap.c
index 1bdcd9e..7e5e92d 100644
--- a/src/base/ftbitmap.c
+++ b/src/base/ftbitmap.c
@@ -971,6 +971,13 @@
pitch = target->pitch;
+ if ( !pitch )
+ {
+ FT_TRACE5(( "FT_Blend_Bitmap:"
+ " zero target bitmap pitch is invalid\n" ));
+ return FT_THROW( Invalid_Argument );
+ }
+
if ( pitch < 0 )
pitch = -pitch;