From: Jani Taskinen Date: Fri, 17 Aug 2007 10:42:30 +0000 (+0000) Subject: MFH:- Fixed bug #41904 (proc_open with empty env array) X-Git-Tag: php-5.2.4RC3~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b27d339ddb2fc329b15e94c3a7b9e084d5cdb8a7;p=php MFH:- Fixed bug #41904 (proc_open with empty env array) --- diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index df0a8cd83c..57dc02d9be 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -95,6 +95,10 @@ static php_process_env_t _php_array_to_envp(zval *environment, int is_persistent cnt = zend_hash_num_elements(Z_ARRVAL_P(environment)); if (cnt < 1) { +#ifndef PHP_WIN32 + env.envarray = (char **) pecalloc(1, sizeof(char *), is_persistent); +#endif + env.envp = (char *) pecalloc(4, 1, is_persistent); return env; }