cvs: gd /libgd ISSUES gdcache.c

From: Date: Wed, 03 Jan 2007 20:50:12 +0000
Subject: cvs: gd /libgd ISSUES gdcache.c
Groups: php.gd.cvs 
Request: Send a blank email to php-gd-cvs+get-53@lists.php.net to get a copy of this message
pajoye Wed Jan 3 20:50:12 2007 UTC Modified files: /gd/libgd gdcache.c ISSUES Log: #25, Added sanity checks for possible allocation failures in gdCacheCreate and main http://cvs.php.net/viewvc.cgi/gd/libgd/gdcache.c?r1=1.6&r2=1.7&diff_format=u Index: gd/libgd/gdcache.c diff -u gd/libgd/gdcache.c:1.6 gd/libgd/gdcache.c:1.7 --- gd/libgd/gdcache.c:1.6 Wed Apr 5 15:47:56 2006 +++ gd/libgd/gdcache.c Wed Jan 3 20:50:12 2007 @@ -71,6 +71,10 @@ gdCache_head_t *head; head = (gdCache_head_t *) gdMalloc (sizeof (gdCache_head_t)); + if (!head) { + return NULL; + } + head->mru = NULL; head->size = size; head->gdCacheTest = gdCacheTest; @@ -195,6 +199,9 @@ int elem, key; cacheTable = gdCacheCreate (3, cacheTest, cacheFetch, cacheRelease); + if (!cacheTable) { + exit(1); + } key = 20; elem = *(int *) gdCacheGet (cacheTable, &key); http://cvs.php.net/viewvc.cgi/gd/libgd/ISSUES?r1=1.22&r2=1.23&diff_format=u Index: gd/libgd/ISSUES diff -u gd/libgd/ISSUES:1.22 gd/libgd/ISSUES:1.23 --- gd/libgd/ISSUES:1.22 Wed Jan 3 20:45:58 2007 +++ gd/libgd/ISSUES Wed Jan 3 20:50:12 2007 @@ -44,6 +44,8 @@ #20, Fixed gdImageCopyMergeGray when used with a true color image #21, gdImageCopyResized sanity check for allocation failures #22, Fixed transparency preservation in gdImageCopyRotated -#23, Added sanity checks for possible allocation failures in +#23, Added sanity checks for possible allocation failures in gdImageFilledPolygon and gdImageSetStyle -#24, Out of range checks in gdImageSetAAPixelColor +#24, Out of range checks in gdImageSetAAPixelColor +#25, Added sanity checks for possible allocation failures in gdCacheCreate + and main

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