cvs: php-src(PHP_5_0) /ext/gd gd.c

From: Date: Tue, 02 Nov 2004 16:41:27 +0000
Subject: cvs: php-src(PHP_5_0) /ext/gd gd.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-29104@lists.php.net to get a copy of this message
iliaa Tue Nov 2 11:41:27 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/gd gd.c Log: Fixed bug #30658 (Ensure that temporary files created by GD are removed). http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.294.2.3&r2=1.294.2.4&ty=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.294.2.3 php-src/ext/gd/gd.c:1.294.2.4 --- php-src/ext/gd/gd.c:1.294.2.3 Mon Aug 16 19:08:56 2004 +++ php-src/ext/gd/gd.c Tue Nov 2 11:41:26 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c,v 1.294.2.3 2004/08/16 23:08:56 iliaa Exp $ */ +/* $Id: gd.c,v 1.294.2.4 2004/11/02 16:41:26 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1767,8 +1767,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; @@ -1823,7 +1824,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; }

« previous php.cvs (#29104) next »