[bdf] Prevent memory leak (#46217).
* src/bdf/bdflib.c (_bdf_parse_glyphs) <STARTCHAR>: Check _BDF_GLYPH_BITS.
This commit is contained in:
parent
797ca5acb5
commit
b185747dd6
@ -1,3 +1,10 @@
|
||||
2015-10-17 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[bdf] Prevent memory leak (#46217).
|
||||
|
||||
* src/bdf/bdflib.c (_bdf_parse_glyphs) <STARTCHAR>: Check
|
||||
_BDF_GLYPH_BITS.
|
||||
|
||||
2015-10-17 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[bdf] Use stream size to adjust number of glyphs.
|
||||
|
@ -1650,6 +1650,14 @@
|
||||
/* Check for the STARTCHAR field. */
|
||||
if ( _bdf_strncmp( line, "STARTCHAR", 9 ) == 0 )
|
||||
{
|
||||
if ( p->flags & _BDF_GLYPH_BITS )
|
||||
{
|
||||
/* Missing ENDCHAR field. */
|
||||
FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG1, lineno, "ENDCHAR" ));
|
||||
error = FT_THROW( Missing_Startchar_Field );
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
/* Set the character name in the parse info first until the */
|
||||
/* encoding can be checked for an unencoded character. */
|
||||
FT_FREE( p->glyph_name );
|
||||
|
Loading…
Reference in New Issue
Block a user