File CVE-2012-1133.patch of Package freetype2

---
 src/bdf/bdflib.c |    5 +++++
 1 file changed, 5 insertions(+)

Index: freetype-2.4.4/src/bdf/bdflib.c
===================================================================
--- freetype-2.4.4.orig/src/bdf/bdflib.c
+++ freetype-2.4.4/src/bdf/bdflib.c
@@ -1586,6 +1586,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;
+
       /* 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 )
openSUSE Build Service is sponsored by