cvs: php4 /ext/gd/libgd gdft.c
| From: | Derick Rethans | Date: | Sun, 17 Nov 2002 13:11:47 +0000 |
| Subject: | cvs: php4 /ext/gd/libgd gdft.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-16349@lists.php.net to get a copy of this message | ||
derick Sun Nov 17 08:11:47 2002 EDT
Modified files:
/php4/ext/gd/libgd gdft.c
Log:
- MFB: Fix memory allocation problem in bundled GD (reported by Brian Havard)
Index: php4/ext/gd/libgd/gdft.c
diff -u php4/ext/gd/libgd/gdft.c:1.11 php4/ext/gd/libgd/gdft.c:1.12
--- php4/ext/gd/libgd/gdft.c:1.11 Tue Nov 12 08:12:58 2002
+++ php4/ext/gd/libgd/gdft.c Sun Nov 17 08:11:46 2002
@@ -347,7 +347,7 @@
FT_CharMap charmap;
a = (font_t *) gdMalloc (sizeof (font_t));
- a->fontlist = strdup (b->fontlist);
+ a->fontlist = estrdup (b->fontlist);
a->library = b->library;
/*
@@ -356,7 +356,7 @@
fontsearchpath = getenv ("GDFONTPATH");
if (!fontsearchpath)
fontsearchpath = DEFAULT_FONTPATH;
- fontlist = strdup (a->fontlist);
+ fontlist = estrdup (a->fontlist);
/*
* Must use gd_strtok_r else pointer corrupted by strtok in nested loop.
@@ -366,7 +366,7 @@
{
/* make a fresh copy each time - strtok corrupts it. */
- path = strdup (fontsearchpath);
+ path = estrdup (fontsearchpath);
/*
* Allocate an oversized buffer that is guaranteed to be
* big enough for all paths to be tested.