From 28dd2c45957278e962f95633157b6139de8170aa Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sun, 26 Feb 2012 06:18:58 +0100 Subject: [PATCH] [bdf] Fix Savannah bug #35607. * src/bdf/bdflib.c (_bdf_parse_glyphs) : Normalize negative encoding values. --- ChangeLog | 7 +++++++ src/bdf/bdflib.c | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 044c3b040..a99df1d5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-02-26 Werner Lemberg + + [bdf] Fix Savannah bug #35607. + + * src/bdf/bdflib.c (_bdf_parse_glyphs) : Normalize + negative encoding values. + 2012-02-26 Werner Lemberg [type1] Fix Savannah bug #35606. diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c index f2ca92df6..4242cab6b 100644 --- a/src/bdf/bdflib.c +++ b/src/bdf/bdflib.c @@ -1606,6 +1606,11 @@ p->glyph_enc = _bdf_atol( p->list.field[1], 0, 10 ); + /* Normalize negative encoding values. The specification only */ + /* allows -1, but we can be more generous here. */ + if ( p->glyph_enc < -1 ) + p->glyph_enc = -1; + FT_TRACE4(( DBGMSG2, p->glyph_enc )); /* Check that the encoding is in the Unicode range because */