diff options
| author | Jani Taskinen <jani@php.net> | 2009-07-23 14:54:04 +0000 |
|---|---|---|
| committer | Jani Taskinen <jani@php.net> | 2009-07-23 14:54:04 +0000 |
| commit | 6dc86facd091bf78b4b76328258801672affde00 (patch) | |
| tree | 70d360e1289146895d953efb36acafb4d238130b | |
| parent | 855034b95510c407f0e2c05ba26a32789fa104d4 (diff) | |
| download | php-git-6dc86facd091bf78b4b76328258801672affde00.tar.gz | |
- Fixed bug #48802 (printf() returns incorrect outputted length)
| -rw-r--r-- | NEWS | 5 | ||||
| -rw-r--r-- | ext/standard/formatted_print.c | 12 | ||||
| -rw-r--r-- | sapi/cli/php_cli.c | 2 |
3 files changed, 10 insertions, 9 deletions
@@ -14,17 +14,18 @@ PHP NEWS (Greg) - Fixed bug #49018 (phar tar stores long filenames wit prefix/name reversed). (Greg) +- Fixed bug #49014 (dechunked filter broken when serving more than 8192 bytes in + a chunk). (andreas dot streichardt at globalpark dot com, Ilia) - Fixed bug #48962 (cURL does not upload files with specified filename). (Ilia) - Fixed bug #48929 (Double \r\n after HTTP headers when "header" context option is an array). (David Zülke) -- Fixed bug #49014 (dechunked filter broken when serving more than 8192 bytes in - a chunk) (andreas dot streichardt at globalpark dot com, Ilia) - Fixed bug #48899 (is_callable returns true even if method does not exist in parent class). (Felipe) - Fixed bug #48893 (Problems compiling with Curl). (Felipe) - Fixed bug #48854 (array_merge_recursive modifies arrays after first one). (Felipe) +- Fixed bug #48802 (printf() returns incorrect outputted length). (Jani) - Fixed bug #48788 (RecursiveDirectoryIterator doesn't descend into symlinked directories). (Ilia) - Fixed bug #48771 (rename() between volumes fails and reports no error on diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index a6b8af783d..6d3e5ad8e1 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -697,14 +697,14 @@ PHP_FUNCTION(vsprintf) PHP_FUNCTION(user_printf) { char *result; - int len; + int len, rlen; if ((result=php_formatted_print(ht, &len, 0, 0 TSRMLS_CC))==NULL) { RETURN_FALSE; } - PHPWRITE(result, len); + rlen = PHPWRITE(result, len); efree(result); - RETURN_LONG(len); + RETURN_LONG(rlen); } /* }}} */ @@ -713,14 +713,14 @@ PHP_FUNCTION(user_printf) PHP_FUNCTION(vprintf) { char *result; - int len; + int len, rlen; if ((result=php_formatted_print(ht, &len, 1, 0 TSRMLS_CC))==NULL) { RETURN_FALSE; } - PHPWRITE(result, len); + rlen = PHPWRITE(result, len); efree(result); - RETURN_LONG(len); + RETURN_LONG(rlen); } /* }}} */ diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index a8ab0edf71..71e0fd98ac 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -298,7 +298,7 @@ static int sapi_cli_ub_write(const char *str, uint str_length TSRMLS_DC) /* {{{ remaining -= ret; } - return str_length; + return (ptr - str); } /* }}} */ |
