[bdf] Fix Savannah bug #37907. * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Normalize negative second parameter of `ENCODING' field also.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
diff --git a/ChangeLog b/ChangeLog
index 2cf618d..0887754 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,17 +1,24 @@
2012-12-15 Werner Lemberg <wl@gnu.org>
+ [bdf] Fix Savannah bug #37907.
+
+ * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Normalize
+ negative second parameter of `ENCODING' field also.
+
+2012-12-15 Werner Lemberg <wl@gnu.org>
+
[bdf] Fix Savannah bug #37906.
- * src/bdf/bdflib.c (_bdf_parse_glyphs): Use correct array size for
- checking `glyph_enc'.
+ * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Use correct array
+ size for checking `glyph_enc'.
2012-12-15 Werner Lemberg <wl@gnu.org>
[bdf] Fix Savannah bug #37905.
- * src/bdf/bdflib.c (_bdf_parse_start): Reset `props_size' to zero in
- case of allocation error; this value gets used in a loop in
- `bdf_free_font'.
+ * src/bdf/bdflib.c (_bdf_parse_start) <STARTPROPERTIES>: Reset
+ `props_size' to zero in case of allocation error; this value gets
+ used in a loop in `bdf_free_font'.
2012-12-10 Alexei Podtelezhnikov <apodtele@gmail.com>
diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
index f9c06ca..365e671 100644
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -1624,6 +1624,9 @@
if ( p->glyph_enc == -1 && p->list.used > 2 )
p->glyph_enc = _bdf_atol( p->list.field[2], 0, 10 );
+ 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 */