com php-src: Merge remote-tracking branch 'origin/PHP-5.6' into str_size_and_int64_56_backport: ext/simpl exml/simplexml.c main/output.c
main/streams/streams.c
| From: | Anatol Belski | Date: | Sat, 05 Apr 2014 07:53:38 +0000 |
| Subject: | com php-src: Merge remote-tracking branch 'origin/PHP-5.6' into str_size_and_int64_56_backport: ext/simpl exml/simplexml.c main/output.c main/streams/streams.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-76708@lists.php.net to get a copy of this message | ||
Commit: d308724d199d0a2742cd7477e97eac4eb97e9662
Author: Anatol Belski <ab@php.net> Sat, 5 Apr 2014 09:53:38 +0200
Parents: 582bf28311eaaf7f41db1ba47437a862a19e9ab9 12e222ee9148ea919e10ab6af4d4da164200eda7
Branches: str_size_and_int64_56_backport
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d308724d199d0a2742cd7477e97eac4eb97e9662
Log:
Merge remote-tracking branch 'origin/PHP-5.6' into str_size_and_int64_56_backport
* origin/PHP-5.6:
updated NEWS
updated NEWS
Fixed bug #66084 simplexml_load_string() mangles empty node name
cleanup NEWS
NEWS
NEWS
Fix Bug #66736 fpassthru broken
Bugs:
https://bugs.php.net/66084
https://bugs.php.net/66736
Changed paths:
MM ext/simplexml/simplexml.c
MM main/output.c
MM main/streams/streams.c
Diff:
diff --cc main/output.c
index 0093654,1dac717..4f19b17
--- a/main/output.c
+++ b/main/output.c
@@@ -232,8 -232,15 +232,15 @@@ PHPAPI int php_output_get_status(TSRMLS
/* {{{ int php_output_write_unbuffered(const char *str, size_t len TSRMLS_DC)
* Unbuffered write */
-PHPAPI int php_output_write_unbuffered(const char *str, size_t len TSRMLS_DC)
+PHPAPI php_size_t php_output_write_unbuffered(const char *str, php_size_t len TSRMLS_DC)
{
+ #if PHP_DEBUG
+ if (len > UINT_MAX) {
+ php_error(E_WARNING, "Attempt to output more than UINT_MAX bytes at once; "
+ "output will be truncated %lu => %lu",
+ (unsigned long) len, (unsigned long) (len % UINT_MAX));
+ }
+ #endif
if (OG(flags) & PHP_OUTPUT_DISABLED) {
return 0;
}
@@@ -246,8 -253,15 +253,15 @@@
/* {{{ int php_output_write(const char *str, size_t len TSRMLS_DC)
* Buffered write */
-PHPAPI int php_output_write(const char *str, size_t len TSRMLS_DC)
+PHPAPI php_size_t php_output_write(const char *str, php_size_t len TSRMLS_DC)
{
+ #if PHP_DEBUG
+ if (len > UINT_MAX) {
+ php_error(E_WARNING, "Attempt to output more than UINT_MAX bytes at once; "
+ "output will be truncated %lu => %lu",
+ (unsigned long) len, (unsigned long) (len % UINT_MAX));
+ }
+ #endif
if (OG(flags) & PHP_OUTPUT_DISABLED) {
return 0;
}