Fix Bug #66736 fpassthru broken

This commit is contained in:
Michael Wallner 2014-04-03 10:40:06 +02:00
parent 7ab5c593f7
commit d08b4dbf23
3 changed files with 22 additions and 2 deletions

View file

@ -234,6 +234,13 @@ PHPAPI int php_output_get_status(TSRMLS_D)
* Unbuffered write */
PHPAPI int php_output_write_unbuffered(const char *str, 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;
}
@ -248,6 +255,13 @@ PHPAPI int php_output_write_unbuffered(const char *str, size_t len TSRMLS_DC)
* Buffered write */
PHPAPI int php_output_write(const char *str, 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;
}