iliaa Tue Nov 2 11:42:14 2004 EDT Modified files: (Branch: PHP_4_3) /php-src NEWS /php-src/ext/gd gd.c Log: MFH: Fixed bug #30658 (Ensure that temporary files created by GD are removed). http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.748&r2=1.1247.2.749&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.748 php-src/NEWS:1.1247.2.749 --- php-src/NEWS:1.1247.2.748 Sun Oct 31 23:56:09 2004 +++ php-src/NEWS Tue Nov 2 11:42:12 2004 @@ -4,6 +4,8 @@ - Fixed a bug in addslashes() handling of the '\0' character. (Ilia) - Backported Marcus' foreach() speedup patch from PHP 5.x. (Derick) - Fixed potential problems with unserializing invalid serialize data. (Marcus) +- Fixed bug #30658 (Ensure that temporary files created by GD are removed). + (Ilia) - Fixed bug #30613 (Prevent infinite recursion in url redirection). (Ilia) - Fixed bug #30475 (curl_getinfo() may crash in some situations). (Ilia) - Fixed bug #30442 (segfault when parsing ?getvariable[][ ). (Tony) http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.221.2.45&r2=1.221.2.46&ty=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.221.2.45 php-src/ext/gd/gd.c:1.221.2.46 --- php-src/ext/gd/gd.c:1.221.2.45 Mon Aug 16 19:08:54 2004 +++ php-src/ext/gd/gd.c Tue Nov 2 11:42:13 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c,v 1.221.2.45 2004/08/16 23:08:54 iliaa Exp $ */ +/* $Id: gd.c,v 1.221.2.46 2004/11/02 16:42:13 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1663,8 +1663,9 @@ int b; FILE *tmp; char buf[4096]; + char *path; - tmp = php_open_temporary_file("", "", NULL TSRMLS_CC); + tmp = php_open_temporary_file("", "", &path TSRMLS_CC); if (tmp == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open temporary file"); RETURN_FALSE; @@ -1717,7 +1718,8 @@ } fclose(tmp); - /* the temporary file is automatically deleted */ + VCWD_UNLINK((const char *)path); /* make sure that the temporary file is removed */ + efree(path); } RETURN_TRUE; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php