| 1 |
kkofler |
1.1 |
--- freetype-2.4.4/src/bdf/bdflib.c 2012-03-28 15:24:32.000000000 +0200
|
| 2 |
|
|
+++ freetype-2.4.4/src/bdf/bdflib.c 2012-03-28 15:25:18.000000000 +0200
|
| 3 |
|
|
@@ -1587,6 +1587,11 @@
|
| 4 |
|
|
|
| 5 |
|
|
p->glyph_enc = _bdf_atol( p->list.field[1], 0, 10 );
|
| 6 |
|
|
|
| 7 |
|
|
+ /* Normalize negative encoding values. The specification only */
|
| 8 |
|
|
+ /* allows -1, but we can be more generous here. */
|
| 9 |
|
|
+ if ( p->glyph_enc < -1 )
|
| 10 |
|
|
+ p->glyph_enc = -1;
|
| 11 |
|
|
+
|
| 12 |
|
|
/* Check that the encoding is in the range [0,65536] because */
|
| 13 |
|
|
/* otherwise p->have (a bitmap with static size) overflows. */
|
| 14 |
|
|
if ( (size_t)p->glyph_enc >= sizeof ( p->have ) * 8 )
|