[bdf] Add missing overflow check.
* src/bdf/bdflib.c (_bdf_parse_glyphs) <BITMAP>: Add threshold for `glyph->bpr'.
This commit is contained in:
parent
26dfeb6d63
commit
c4cad30ed1
@ -1,3 +1,10 @@
|
||||
2012-03-08 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[bdf] Add missing overflow check.
|
||||
|
||||
* src/bdf/bdflib.c (_bdf_parse_glyphs) <BITMAP>: Add threshold for
|
||||
`glyph->bpr'.
|
||||
|
||||
2012-03-07 Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Prepare source code for amalgamation.
|
||||
|
@ -1912,7 +1912,7 @@
|
||||
glyph->bpr = ( glyph->bbx.width * p->font->bpp + 7 ) >> 3;
|
||||
|
||||
bitmap_size = glyph->bpr * glyph->bbx.height;
|
||||
if ( bitmap_size > 0xFFFFU )
|
||||
if ( glyph->bpr > 0xFFFFU || bitmap_size > 0xFFFFU )
|
||||
{
|
||||
FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG4, lineno ));
|
||||
error = BDF_Err_Bbx_Too_Big;
|
||||
|
Loading…
Reference in New Issue
Block a user