cvs: gd /libgd ISSUES gdft.c

From: Date: Wed, 03 Jan 2007 20:56:50 +0000
Subject: cvs: gd /libgd ISSUES gdft.c
Groups: php.gd.cvs 
Request: Send a blank email to php-gd-cvs+get-54@lists.php.net to get a copy of this message
pajoye Wed Jan 3 20:56:50 2007 UTC Modified files: /gd/libgd gdft.c ISSUES Log: #26, gdFontCacheSetup returns error when gdCacheCreate fails #27, Added sanity checks for possible failures in fontFetch and tweenColorFetch http://cvs.php.net/viewvc.cgi/gd/libgd/gdft.c?r1=1.25&r2=1.26&diff_format=u Index: gd/libgd/gdft.c diff -u gd/libgd/gdft.c:1.25 gd/libgd/gdft.c:1.26 --- gd/libgd/gdft.c:1.25 Wed Sep 27 23:05:18 2006 +++ gd/libgd/gdft.c Wed Jan 3 20:56:49 2007 @@ -439,6 +439,10 @@ *error = NULL; a = (font_t *) gdMalloc (sizeof (font_t)); + if (!a) { + return NULL; + } + a->fontlist = strdup (b->fontlist); a->flags = b->flags; a->library = b->library; @@ -538,6 +542,10 @@ gdImagePtr im; a = (tweencolor_t *) gdMalloc (sizeof (tweencolor_t)); + if (!a) { + return NULL; + } + pixel = a->pixel = b->pixel; bg = a->bgcolor = b->bgcolor; fg = a->fgcolor = b->fgcolor; @@ -818,6 +826,9 @@ return -1; } fontCache = gdCacheCreate (FONTCACHESIZE, fontTest, fontFetch, fontRelease); + if (!fontCache) { + return -2; + } return 0; } http://cvs.php.net/viewvc.cgi/gd/libgd/ISSUES?r1=1.23&r2=1.24&diff_format=u Index: gd/libgd/ISSUES diff -u gd/libgd/ISSUES:1.23 gd/libgd/ISSUES:1.24 --- gd/libgd/ISSUES:1.23 Wed Jan 3 20:50:12 2007 +++ gd/libgd/ISSUES Wed Jan 3 20:56:49 2007 @@ -49,3 +49,6 @@ #24, Out of range checks in gdImageSetAAPixelColor #25, Added sanity checks for possible allocation failures in gdCacheCreate and main +#26, gdFontCacheSetup returns error when gdCacheCreate fails +#27, Added sanity checks for possible failures in fontFetch and + tweenColorFetch

« previous php.gd.cvs (#54) next »