ref: 9f6ed10545b1009cce86289f793165dd7e4b7c9e
parent: af400438b7da3f07afadc3a5b3a6b982b2bdb84e
author: Werner Lemberg <[email protected]>
date: Mon Apr 22 04:10:56 EDT 2019
* src/base/ftbitmap.c (FT_Bitmap_Blend): Check target pitch. Problem reported by Sender Ghost <[email protected]>.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2019-04-22 Werner Lemberg <[email protected]>
+ * src/base/ftbitmap.c (FT_Bitmap_Blend): Check target pitch.
+
+ Problem reported by Sender Ghost <[email protected]>.
+
+2019-04-22 Werner Lemberg <[email protected]>
+
Fix return value of `FT_Set_Named_Instance' (#56186).
* src/truetype/ttgxvar.c (TT_Set_Named_Instance): Correctly handle
--- 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;