pajoye          Wed Jan  9 01:52:03 2008 UTC

  Modified files:              
    /php-src/ext/gd/libgd       gdft.c 
  Log:
  - MFB: #43790, fix crash when no family name has been found
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gdft.c?r1=1.45&r2=1.46&diff_format=u
Index: php-src/ext/gd/libgd/gdft.c
diff -u php-src/ext/gd/libgd/gdft.c:1.45 php-src/ext/gd/libgd/gdft.c:1.46
--- php-src/ext/gd/libgd/gdft.c:1.45    Mon Apr 23 15:06:13 2007
+++ php-src/ext/gd/libgd/gdft.c Wed Jan  9 01:52:03 2008
@@ -947,7 +947,8 @@
 
 /* EAM DEBUG */
 #if (defined(FREETYPE_MAJOR) && ((FREETYPE_MAJOR == 2 && ((FREETYPE_MINOR == 1 
&& FREETYPE_PATCH >= 3) || FREETYPE_MINOR > 1) || FREETYPE_MAJOR > 2)))
-               if (font->face->charmap->encoding == FT_ENCODING_MS_SYMBOL && 
strcmp(font->face->family_name, "Symbol") == 0) {
+               if (font->face->family_name && font->face->charmap->encoding &&
+                       font->face->charmap->encoding == FT_ENCODING_MS_SYMBOL 
&& strcmp(font->face->family_name, "Symbol") == 0) {
                        /* I do not know the significance of the constant 
0xf000.
                         * It was determined by inspection of the character 
codes
                         * stored in Microsoft font symbol.

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to