[PHP-CVS] cvs: php-src(PHP_5_0) /ext/gd gd.c
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;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd gd.c
iliaa Tue Nov 2 11:41:41 2004 EDT
Modified files:
/php-src/ext/gd gd.c
Log:
MFB: 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.298&r2=1.299&ty=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.298 php-src/ext/gd/gd.c:1.299
--- php-src/ext/gd/gd.c:1.298 Mon Aug 16 19:07:42 2004
+++ php-src/ext/gd/gd.c Tue Nov 2 11:41:41 2004
@@ -18,7 +18,7 @@
+--+
*/
-/* $Id: gd.c,v 1.298 2004/08/16 23:07:42 iliaa Exp $ */
+/* $Id: gd.c,v 1.299 2004/11/02 16:41:41 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;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/gd gd.c
iliaa Tue Nov 2 11:42:14 2004 EDT
Modified files: (Branch: PHP_4_3)
/php-srcNEWS
/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/NEWSTue 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
[PHP-CVS] cvs: php-src(PHP_5_0) / NEWS
iliaa Tue Nov 2 11:42:46 2004 EDT Modified files: (Branch: PHP_5_0) /php-srcNEWS Log: Bug fixing news. http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.113&r2=1.1760.2.114&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.113 php-src/NEWS:1.1760.2.114 --- php-src/NEWS:1.1760.2.113 Mon Nov 1 04:51:57 2004 +++ php-src/NEWSTue Nov 2 11:42:46 2004 @@ -7,8 +7,10 @@ - Extended the functionality of is_subclass_of() to accept either a class name or an object as first parameter. (Andrey) - Fixed potential problems with unserializing invalid serialize data. (Marcus) -- Fixed bug #30572 (crash when comparing SimpleXML attribute to a boolean). +- Fixed bug #30658 (Ensure that temporary files created by GD are removed). (Ilia) +- Fixed bug #30572 (crash when comparing SimpleXML attribute to a boolean). + (Andi) - Fixed bug #30475 (curl_getinfo() may crash in some situations). (Ilia) - Fixed bug #30442 (segfault when parsing ?getvariable[][ ). (Tony) - Fixed bug #30388 (rename across filesystems loses ownership and -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard basic_functions.c /main php.h
andrey Tue Nov 2 12:03:21 2004 EDT Modified files: /php-src/main php.h /php-src/ext/standard basic_functions.c Log: make sleep() return it's return value when possible #on some *nix systems sleep() is implemented with SIGALRM. When SIGALRM #interrupts sleep() it returns the number of seconds that has to be slept #till the number of seconds wanted by the script. Sleep() on Windows is # void. http://cvs.php.net/diff.php/php-src/main/php.h?r1=1.205&r2=1.206&ty=u Index: php-src/main/php.h diff -u php-src/main/php.h:1.205 php-src/main/php.h:1.206 --- php-src/main/php.h:1.205Thu Sep 30 04:03:38 2004 +++ php-src/main/php.h Tue Nov 2 12:03:19 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php.h,v 1.205 2004/09/30 08:03:38 helly Exp $ */ +/* $Id: php.h,v 1.206 2004/11/02 17:03:19 andrey Exp $ */ #ifndef PHP_H #define PHP_H @@ -252,6 +252,7 @@ /* global variables */ extern pval *data; #if !defined(PHP_WIN32) +#define PHP_SLEEP_NON_VOID #define php_sleep sleep extern char **environ; #endif /* !defined(PHP_WIN32) */ http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.695&r2=1.696&ty=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.695 php-src/ext/standard/basic_functions.c:1.696 --- php-src/ext/standard/basic_functions.c:1.695Fri Oct 8 18:19:03 2004 +++ php-src/ext/standard/basic_functions.c Tue Nov 2 12:03:20 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.695 2004/10/08 22:19:03 helly Exp $ */ +/* $Id: basic_functions.c,v 1.696 2004/11/02 17:03:20 andrey Exp $ */ #include "php.h" #include "php_streams.h" @@ -1733,7 +1733,14 @@ } convert_to_long_ex(num); - php_sleep(Z_LVAL_PP(num)); +#ifdef PHP_SLEEP_NON_VOID + RETURN_LONG( +#endif + php_sleep(Z_LVAL_PP(num)) +#ifdef PHP_SLEEP_NON_VOID + ) +#endif + ; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/standard basic_functions.c /main php.h
andrey Tue Nov 2 12:25:14 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/main php.h /php-src/ext/standard basic_functions.c Log: MFH http://cvs.php.net/diff.php/php-src/main/php.h?r1=1.203&r2=1.203.2.1&ty=u Index: php-src/main/php.h diff -u php-src/main/php.h:1.203 php-src/main/php.h:1.203.2.1 --- php-src/main/php.h:1.203Sun Jan 11 19:19:40 2004 +++ php-src/main/php.h Tue Nov 2 12:25:13 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php.h,v 1.203 2004/01/12 00:19:40 helly Exp $ */ +/* $Id: php.h,v 1.203.2.1 2004/11/02 17:25:13 andrey Exp $ */ #ifndef PHP_H #define PHP_H @@ -271,6 +271,7 @@ #else /* NETWARE */ extern char **environ; #define php_sleep sleep +#define PHP_SLEEP_NON_VOID #endif /* NETWARE */ #endif /* !defined(PHP_WIN32) */ http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.673.2.4&r2=1.673.2.5&ty=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.673.2.4 php-src/ext/standard/basic_functions.c:1.673.2.5 --- php-src/ext/standard/basic_functions.c:1.673.2.4Thu Aug 19 11:15:32 2004 +++ php-src/ext/standard/basic_functions.c Tue Nov 2 12:25:14 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.673.2.4 2004/08/19 15:15:32 tony2001 Exp $ */ +/* $Id: basic_functions.c,v 1.673.2.5 2004/11/02 17:25:14 andrey Exp $ */ #include "php.h" #include "php_streams.h" @@ -1649,7 +1649,14 @@ } convert_to_long_ex(num); - php_sleep(Z_LVAL_PP(num)); +#ifdef PHP_SLEEP_NON_VOID + RETURN_LONG( +#endif + php_sleep(Z_LVAL_PP(num)) +#ifdef PHP_SLEEP_NON_VOID + ) +#endif + ; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl spl_iterators.c
fmk Tue Nov 2 20:16:11 2004 EDT
Modified files:
/php-src/ext/splspl_iterators.c
Log:
Add termination block to function table. This will allow the engine to stop
registreting functions at the end.
This fixes the - duplicate name - warning
http://cvs.php.net/diff.php/php-src/ext/spl/spl_iterators.c?r1=1.54&r2=1.55&ty=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.54 php-src/ext/spl/spl_iterators.c:1.55
--- php-src/ext/spl/spl_iterators.c:1.54Mon Nov 1 18:16:43 2004
+++ php-src/ext/spl/spl_iterators.c Tue Nov 2 20:16:10 2004
@@ -16,7 +16,7 @@
+--+
*/
-/* $Id: spl_iterators.c,v 1.54 2004/11/01 23:16:43 helly Exp $ */
+/* $Id: spl_iterators.c,v 1.55 2004/11/03 01:16:10 fmk Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -1557,6 +1557,7 @@
static zend_function_entry spl_funcs_InfiniteIterator[] = {
SPL_ME(InfiniteIterator, __construct, arginfo_norewind_it___construct,
ZEND_ACC_PUBLIC)
SPL_ME(InfiniteIterator, next, NULL, ZEND_ACC_PUBLIC)
+ {NULL, NULL, NULL}
};
/* {{{ proto EmptyIterator::rewind()
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl spl_iterators.c
fmk Tue Nov 2 20:20:17 2004 EDT
Modified files:
/php-src/ext/splspl_iterators.c
Log:
oops missed a couple!
Add termination block to function table. This will allow the engine to stop
registreting functions at the end.
This fixes the - duplicate name - warning
http://cvs.php.net/diff.php/php-src/ext/spl/spl_iterators.c?r1=1.55&r2=1.56&ty=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.55 php-src/ext/spl/spl_iterators.c:1.56
--- php-src/ext/spl/spl_iterators.c:1.55Tue Nov 2 20:16:10 2004
+++ php-src/ext/spl/spl_iterators.c Tue Nov 2 20:20:16 2004
@@ -16,7 +16,7 @@
+--+
*/
-/* $Id: spl_iterators.c,v 1.55 2004/11/03 01:16:10 fmk Exp $ */
+/* $Id: spl_iterators.c,v 1.56 2004/11/03 01:20:16 fmk Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -1599,6 +1599,7 @@
SPL_ME(EmptyIterator, key, NULL, ZEND_ACC_PUBLIC)
SPL_ME(EmptyIterator, current, NULL, ZEND_ACC_PUBLIC)
SPL_ME(EmptyIterator, next, NULL, ZEND_ACC_PUBLIC)
+ {NULL, NULL, NULL}
};
int spl_append_it_next_iterator(spl_dual_it_object *intern TSRMLS_DC) /* {{{*/
@@ -1729,6 +1730,7 @@
SPL_ME(dual_it,current, NULL, ZEND_ACC_PUBLIC)
SPL_ME(AppendIterator, next, NULL, ZEND_ACC_PUBLIC)
SPL_ME(dual_it,getInnerIterator, NULL, ZEND_ACC_PUBLIC)
+ {NULL, NULL, NULL}
};
/* {{{ array iterator_to_array(IteratorAggregate it)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard basic_functions.c
tony2001Wed Nov 3 01:22:10 2004 EDT Modified files: /php-src/ext/standard basic_functions.c Log: fix build http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.696&r2=1.697&ty=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.696 php-src/ext/standard/basic_functions.c:1.697 --- php-src/ext/standard/basic_functions.c:1.696Tue Nov 2 12:03:20 2004 +++ php-src/ext/standard/basic_functions.c Wed Nov 3 01:22:08 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.696 2004/11/02 17:03:20 andrey Exp $ */ +/* $Id: basic_functions.c,v 1.697 2004/11/03 06:22:08 tony2001 Exp $ */ #include "php.h" #include "php_streams.h" @@ -1734,13 +1734,11 @@ convert_to_long_ex(num); #ifdef PHP_SLEEP_NON_VOID - RETURN_LONG( -#endif - php_sleep(Z_LVAL_PP(num)) -#ifdef PHP_SLEEP_NON_VOID - ) + RETURN_LONG(php_sleep(Z_LVAL_PP(num))); +#else + php_sleep(Z_LVAL_PP(num)); #endif - ; + } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
