summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2008-01-09 01:51:17 +0000
committerPierre Joye <pajoye@php.net>2008-01-09 01:51:17 +0000
commit3a6acb42b2e333c0d363be0123b1d27ed60300a9 (patch)
treef24f08c3ed81b6c1ebb8bd76a1886ec2b66978a9
parent8055833fac4b8a3bd54b646408fa03c9145bf95a (diff)
downloadphp-git-3a6acb42b2e333c0d363be0123b1d27ed60300a9.tar.gz
- MFB: #43790, fix crash when no family name has been found
-rw-r--r--ext/gd/libgd/gdft.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c
index 49a540c421..e543f2fe2b 100644
--- a/ext/gd/libgd/gdft.c
+++ b/ext/gd/libgd/gdft.c
@@ -947,7 +947,8 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
/* 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.