mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed bug data->fd not set to -1 for open_basedir failure.
This commit is contained in:
parent
d941ac5b4f
commit
f5e097d1ed
1 changed files with 2 additions and 0 deletions
|
@ -176,10 +176,12 @@ static void ps_files_open(ps_files *data, const char *key TSRMLS_DC)
|
||||||
|
|
||||||
if (fstat(data->fd, &sbuf)) {
|
if (fstat(data->fd, &sbuf)) {
|
||||||
close(data->fd);
|
close(data->fd);
|
||||||
|
data->fd = -1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (S_ISLNK(sbuf.st_mode) && php_check_open_basedir(buf TSRMLS_CC)) {
|
if (S_ISLNK(sbuf.st_mode) && php_check_open_basedir(buf TSRMLS_CC)) {
|
||||||
close(data->fd);
|
close(data->fd);
|
||||||
|
data->fd = -1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue