cvs: php4(PHP_4_3) /ext/gd/libgd gdft.c

From: Date: Sun, 17 Nov 2002 13:10:37 +0000
Subject: cvs: php4(PHP_4_3) /ext/gd/libgd gdft.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-16348@lists.php.net to get a copy of this message
derick Sun Nov 17 08:10:37 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/gd/libgd gdft.c Log: - 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.11.2.1 --- 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:10:36 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.

« previous php.cvs (#16348) next »