Skip to content

Commit b1c0614

Browse files
author
Yasuo Ohgaki
committed
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Fixed bug data->fd not set to -1 for open_basedir failure.
2 parents da84f3a + f5e097d commit b1c0614

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/session/mod_files.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,12 @@ static void ps_files_open(ps_files *data, const char *key TSRMLS_DC)
145145

146146
if (fstat(data->fd, &sbuf)) {
147147
close(data->fd);
148+
data->fd = -1;
148149
return;
149150
}
150151
if (S_ISLNK(sbuf.st_mode) && php_check_open_basedir(buf TSRMLS_CC)) {
151152
close(data->fd);
153+
data->fd = -1;
152154
return;
153155
}
154156
}

0 commit comments

Comments
 (0)