cvs: php-src(PHP_4_4) / NEWS /ext/session mod_files.c
| From: | Antony Dovgal | Date: | Fri, 09 Mar 2007 10:29:33 +0000 |
| Subject: | cvs: php-src(PHP_4_4) / NEWS /ext/session mod_files.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-43480@lists.php.net to get a copy of this message | ||
tony2001 Fri Mar 9 10:29:33 2007 UTC
Modified files: (Branch: PHP_4_4)
/php-src NEWS
/php-src/ext/session mod_files.c
Log:
fix #40747 (possible crash in session when save_path is out of open_basedir)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.1247.2.920.2.202&r2=1.1247.2.920.2.203&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.920.2.202 php-src/NEWS:1.1247.2.920.2.203
--- php-src/NEWS:1.1247.2.920.2.202 Wed Feb 28 18:26:31 2007
+++ php-src/NEWS Fri Mar 9 10:29:33 2007
@@ -1,6 +1,8 @@
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2007, Version 4.4.7
+- Fixed bug #40747 (possible crash in session when save_path is out of
+ open_basedir). (Tony)
28 Feb 2007, Version 4.4.6
http://cvs.php.net/viewvc.cgi/php-src/ext/session/mod_files.c?r1=1.83.2.9.2.7&r2=1.83.2.9.2.8&diff_format=u
Index: php-src/ext/session/mod_files.c
diff -u php-src/ext/session/mod_files.c:1.83.2.9.2.7 php-src/ext/session/mod_files.c:1.83.2.9.2.8
--- php-src/ext/session/mod_files.c:1.83.2.9.2.7 Thu Jan 4 23:50:45 2007
+++ php-src/ext/session/mod_files.c Fri Mar 9 10:29:33 2007
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mod_files.c,v 1.83.2.9.2.7 2007/01/04 23:50:45 iliaa Exp $ */
+/* $Id: mod_files.c,v 1.83.2.9.2.8 2007/03/09 10:29:33 tony2001 Exp $ */
#include "php.h"
@@ -239,9 +239,6 @@
ps_files *data;
char *p;
- data = ecalloc(sizeof(*data), 1);
- PS_SET_MOD_DATA(data);
-
if (*save_path == '\0') {
save_path = php_get_temporary_directory();
@@ -252,6 +249,9 @@
return FAILURE;
}
}
+
+ data = ecalloc(sizeof(*data), 1);
+ PS_SET_MOD_DATA(data);
data->fd = -1;
if ((p = strchr(save_path, ';'))) {