diff options
| author | Sascha Schumann <sas@php.net> | 2003-05-13 18:48:01 +0000 |
|---|---|---|
| committer | Sascha Schumann <sas@php.net> | 2003-05-13 18:48:01 +0000 |
| commit | 2c7c0457b68fd8ee7a4232a28656682a29f03372 (patch) | |
| tree | 0e1032684076eee7023348509913773e1979d608 | |
| parent | d3ceb197a23f63b9d5c7d793ab829471e1c02f12 (diff) | |
| download | php-git-2c7c0457b68fd8ee7a4232a28656682a29f03372.tar.gz | |
Ensure that open(".", 0); works, otherwise bail out
| -rw-r--r-- | main/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main/main.c b/main/main.c index 5c4a5c6f73..ce0ce8a847 100644 --- a/main/main.c +++ b/main/main.c @@ -1594,6 +1594,9 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC) #if HAVE_BROKEN_GETCWD /* this looks nasty to me */ old_cwd_fd = open(".", 0); + if (old_cwd_fd == -1) { + zend_bailout(); + } #else VCWD_GETCWD(old_cwd, OLD_CWD_SIZE-1); #endif |
