mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fixed crash (bus error) in readdir() and session cleanup when compiled
with Sun CC.
This commit is contained in:
parent
33d15279ac
commit
7a54e0b10c
2 changed files with 2 additions and 2 deletions
|
@ -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];
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue