summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2003-05-13 18:48:18 +0000
committerSascha Schumann <sas@php.net>2003-05-13 18:48:18 +0000
commitcfeebdf8c55d3257bf317a00f82a6b8725290041 (patch)
tree27998c0386cb67c2fe428a22d8b1702c5961bed6
parentcd1def8074779c23934ff02de768eaa580ae7433 (diff)
downloadphp-git-cfeebdf8c55d3257bf317a00f82a6b8725290041.tar.gz
MFH
-rw-r--r--main/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/main.c b/main/main.c
index df4f073e8c..823046914e 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1593,6 +1593,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