diff options
author | Hartmut Holzgraefe <hholzgra@php.net> | 2000-03-06 15:32:05 +0000 |
---|---|---|
committer | Hartmut Holzgraefe <hholzgra@php.net> | 2000-03-06 15:32:05 +0000 |
commit | 36abfe1121aef9332339bb18981e65e3d7c7f0b4 (patch) | |
tree | 38aa2ca78efde46f9a4677c375e964732b8c21d6 /ext/standard/exec.c | |
parent | 898ff287f2cc3a1f1167f4b23185120d55f6dccd (diff) | |
download | php-git-36abfe1121aef9332339bb18981e65e3d7c7f0b4.tar.gz |
off-by-one error (bug id #3741) fixed
Diffstat (limited to 'ext/standard/exec.c')
-rw-r--r-- | ext/standard/exec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 160e2ca7d3..6e8575816e 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -173,7 +173,7 @@ 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_STRINGL(buf,l,1); + RETVAL_STRINGL(buf,l+1,1); } else { int b, i; @@ -196,6 +196,7 @@ static int _Exec(int type, char *cmd, pval *array, pval *return_value) } /* {{{ proto int exec(string command [, array output [, int return_value]]) + Execute an external program */ PHP_FUNCTION(exec) { @@ -229,6 +230,7 @@ PHP_FUNCTION(exec) break; } } + /* }}} */ /* {{{ proto int system(string command [, int return_value]) |