--- freetype-2.3.11/src/bdf/bdflib.c	2013-01-15 09:57:36.000000000 +0100
+++ freetype-2.3.11/src/bdf/bdflib.c	2013-01-15 10:04:37.000000000 +0100
@@ -1588,9 +1588,11 @@
 
       p->glyph_enc = _bdf_atol( p->list.field[1], 0, 10 );
 
-      /* Check that the encoding is in the range [0,65536] because        */
-      /* otherwise p->have (a bitmap with static size) overflows.         */
-      if ( (size_t)p->glyph_enc >= sizeof ( p->have ) * 8 )
+      /* Check that the encoding is in the Unicode range because  */
+      /* otherwise p->have (a bitmap with static size) overflows. */
+      if ( p->glyph_enc > 0                                      &&
+           (size_t)p->glyph_enc >= sizeof ( p->have ) /
+                                   sizeof ( unsigned long ) * 32 )
       {
         error = BDF_Err_Invalid_File_Format;
         goto Exit;
