cvs: php4 /ext/session mod_files.c /ext/standard dir.c
| From: | Jani Taskinen | Date: | Wed, 18 Oct 2000 14:14:14 +0000 |
| Subject: | cvs: php4 /ext/session mod_files.c /ext/standard dir.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-2116@lists.php.net to get a copy of this message | ||
sniper Wed Oct 18 07:14:14 2000 EDT
Modified files:
/php4/ext/standard dir.c
/php4/ext/session mod_files.c
Log:
Fixed crash (bus error) in readdir() and session cleanup when compiled
with Sun CC.
Index: php4/ext/standard/dir.c
diff -u php4/ext/standard/dir.c:1.44 php4/ext/standard/dir.c:1.45
--- php4/ext/standard/dir.c:1.44 Thu Sep 7 10:55:53 2000
+++ php4/ext/standard/dir.c Wed Oct 18 07:14:13 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dir.c,v 1.44 2000/09/07 17:55:53 stas Exp $ */
+/* $Id: dir.c,v 1.45 2000/10/18 14:14:13 sniper Exp $ */
/* {{{ includes/startup/misc */
@@ -289,7 +289,7 @@
{
pval **id, **tmp, *myself;
php_dir *dirp;
- char entry[sizeof(struct dirent)+MAXPATHLEN+1];
+ char entry[sizeof(struct dirent)+MAXPATHLEN];
struct dirent *result = (struct dirent *)&entry; /* patch for libc5 readdir problems */
DIRLS_FETCH();
Index: php4/ext/session/mod_files.c
diff -u php4/ext/session/mod_files.c:1.49 php4/ext/session/mod_files.c:1.50
--- php4/ext/session/mod_files.c:1.49 Mon Oct 16 19:50:15 2000
+++ php4/ext/session/mod_files.c Wed Oct 18 07:14:14 2000
@@ -156,7 +156,7 @@
static int ps_files_cleanup_dir(const char *dirname, int maxlifetime)
{
DIR *dir;
- char dentry[sizeof(struct dirent) + MAXPATHLEN + 1];
+ char dentry[sizeof(struct dirent) + MAXPATHLEN];
struct dirent *entry = (struct dirent *) &dentry;
struct stat sbuf;
char buf[MAXPATHLEN];