From e783d75ed31f7a9daf8b529d077e7739cbb25de9 Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Sun, 27 Aug 2000 20:51:30 +0000 Subject: [PATCH] sizeof(old_cwd) evaluated to sizeof(char *) after last commit, so old_cwd was not set correctly. --- main/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/main.c b/main/main.c index f22693b7de..4d0e8e7257 100644 --- a/main/main.c +++ b/main/main.c @@ -1132,8 +1132,8 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_ return; } } - - old_cwd = do_alloca(4096); +#define OLD_CWD_SIZE 4096 + old_cwd = do_alloca(OLD_CWD_SIZE); old_cwd[0] = '\0'; if (setjmp(EG(bailout))!=0) { @@ -1149,7 +1149,7 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_ if (primary_file->type == ZEND_HANDLE_FILENAME && primary_file->filename) { - V_GETCWD(old_cwd, sizeof(old_cwd)-1); + V_GETCWD(old_cwd, OLD_CWD_SIZE-1); V_CHDIR_FILE(primary_file->filename); } -- 2.50.1