diff options
author | Werner Lemberg <wl@gnu.org> | 2019-04-22 08:10:56 +0200 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2019-04-22 08:11:28 +0200 |
commit | 9f6ed10545b1009cce86289f793165dd7e4b7c9e (patch) | |
tree | 05e1ef0281e6773192bbdf95793f823864f9edd4 /src/base/ftbitmap.c | |
parent | af400438b7da3f07afadc3a5b3a6b982b2bdb84e (diff) | |
download | freetype2-9f6ed10545b1009cce86289f793165dd7e4b7c9e.tar.gz |
* src/base/ftbitmap.c (FT_Bitmap_Blend): Check target pitch.
Problem reported by Sender Ghost <lightside@gmx.com>.
Diffstat (limited to 'src/base/ftbitmap.c')
-rw-r--r-- | src/base/ftbitmap.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/base/ftbitmap.c b/src/base/ftbitmap.c index 1bdcd9eff..7e5e92d1d 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; |