File CVE-2012-1129.patch of Package freetype2

---
 src/type42/t42parse.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: freetype-2.4.4/src/type42/t42parse.c
===================================================================
--- freetype-2.4.4.orig/src/type42/t42parse.c
+++ freetype-2.4.4/src/type42/t42parse.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 42 font parser (body).                                          */
 /*                                                                         */
-/*  Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by      */
+/*  Copyright 2002-2012 by                                                 */
 /*  Roberto Alameda.                                                       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -608,7 +608,8 @@
       }
 
       /* A string can have a trailing zero byte for padding.  Ignore it. */
-      if ( string_buf[string_size - 1] == 0 && ( string_size % 2 == 1 ) )
+      if ( string_size                                                  &&
+           string_buf[string_size - 1] == 0 && ( string_size % 2 == 1 ) )
         string_size--;
 
       if ( !string_size )
openSUSE Build Service is sponsored by