diff options
author | foobar <sniper@php.net> | 2000-10-18 14:14:14 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2000-10-18 14:14:14 +0000 |
commit | 7a54e0b10c953339d32e8a9379e6888cadb67c8e (patch) | |
tree | 1a65c5212e91625af2612b96ca0ae107a500ac1b | |
parent | 33d15279acba87b7daa3c2771e7add61648c098d (diff) | |
download | php-git-7a54e0b10c953339d32e8a9379e6888cadb67c8e.tar.gz |
Fixed crash (bus error) in readdir() and session cleanup when compiled
with Sun CC.
-rw-r--r-- | ext/session/mod_files.c | 2 | ||||
-rw-r--r-- | ext/standard/dir.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index 8abc31721d..3083bdea66 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -156,7 +156,7 @@ static void ps_files_open(ps_files *data, const char *key) 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]; diff --git a/ext/standard/dir.c b/ext/standard/dir.c index eeebfa5c00..ca5694e44a 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -289,7 +289,7 @@ PHP_FUNCTION(readdir) { 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(); |