From: foobar Date: Sun, 4 Nov 2001 02:09:55 +0000 (+0000) Subject: ws fix X-Git-Tag: ChangeLog~426 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=488b76b95d14f6ef5aa72c04ef886986a83d275f;p=php ws fix --- diff --git a/ext/standard/exec.c b/ext/standard/exec.c index fc35f76fe6..a6e2e7ad77 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -55,11 +55,11 @@ int php_Exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC) void (*sig_handler)(); #endif - buf = (char*) emalloc(EXEC_INPUT_BUF); - if (!buf) { + buf = (char *) emalloc(EXEC_INPUT_BUF); + if (!buf) { php_error(E_WARNING, "Unable to emalloc %d bytes for exec buffer", EXEC_INPUT_BUF); return -1; - } + } buflen = EXEC_INPUT_BUF; if (PG(safe_mode)) { @@ -110,6 +110,7 @@ int php_Exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC) #endif return -1; } + } else { /* not safe_mode */ #if PHP_SIGCHILD sig_handler = signal (SIGCHLD, SIG_DFL);