From: Andrei Zmievski Date: Fri, 11 Feb 2000 19:16:36 +0000 (+0000) Subject: (PHP passthru) Shouldn't return anything. X-Git-Tag: BEFORE_SAPI_POST_PATCH_17_FEB_2000~80 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=055645b079300a91701f6d907ae5f023ed0616f7;p=php (PHP passthru) Shouldn't return anything. This fixes bugs #3428 and #3430. --- diff --git a/ext/standard/exec.c b/ext/standard/exec.c index f12e3dd557..5f009d508d 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -169,7 +169,7 @@ static int _Exec(int type, char *cmd, pval *array, pval *return_value) } else { int b, i; - while ((b = fread(buf, 1, sizeof(buf), fp)) > 0) { + while ((b = fread(buf, 1, buflen, fp)) > 0) { for (i = 0; i < b; i++) if (output) (void)PUTC(buf[i]); } @@ -181,8 +181,6 @@ static int _Exec(int type, char *cmd, pval *array, pval *return_value) tmp = php_addslashes(buf, 0, &len, 0); RETVAL_STRINGL(tmp,len,0); - } else { - RETVAL_STRING(buf,1); } ret = pclose(fp);