* src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
diff --git a/ChangeLog b/ChangeLog
index b9d856a..4250c01 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
+
+2015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
+
* src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
2015-06-23 Werner Lemberg <wl@gnu.org>
diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
index 259c207..414deb5 100644
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -2356,8 +2356,10 @@
p->font->bpp = 8;
else if ( bpp > 2 )
p->font->bpp = 4;
+ else if ( bpp > 1 )
+ p->font->bpp = 2;
else
- p->font->bpp = bpp;
+ p->font->bpp = 1;
if ( p->font->bpp != bpp )
FT_TRACE2(( "_bdf_parse_start: " ACMSG11, p->font->bpp ));