From 680c1d408f9ef71cba361414c3253a933126716e Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 27 Jun 2013 17:21:59 +0200 Subject: [PATCH] * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix bitmap width guard. --- ChangeLog | 4 ++++ src/winfonts/winfnt.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0a03d739a..765c8ce68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-06-27 Werner Lemberg + + * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix bitmap width guard. + 2013-06-25 Werner Lemberg [cff] Add darkening limit to `darkening-parameters'. diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c index e8055c089..ff2ee958d 100644 --- a/src/winfonts/winfnt.c +++ b/src/winfonts/winfnt.c @@ -1024,7 +1024,7 @@ bitmap->rows = font->header.pixel_height; bitmap->pixel_mode = FT_PIXEL_MODE_MONO; - if ( offset + pitch * bitmap->rows >= font->header.file_size ) + if ( offset + pitch * bitmap->rows > font->header.file_size ) { FT_TRACE2(( "invalid bitmap width\n" )); error = FT_THROW( Invalid_File_Format );