summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-08-24 16:20:06 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-08-24 16:20:06 +0000
commit9dd09fa25347a85ccd5e8a1d794d022353aa1ba9 (patch)
treea4c5bc2eae659ed07a9302d46062d1c2b94b8d46
parent78bafb0a0f951727453a5eccdb2fb21491536301 (diff)
downloadphp-git-9dd09fa25347a85ccd5e8a1d794d022353aa1ba9.tar.gz
MFH: Remainder of the 34191 bug fix.
-rw-r--r--main/output.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/output.c b/main/output.c
index bcef214c3d..b503680f73 100644
--- a/main/output.c
+++ b/main/output.c
@@ -294,6 +294,9 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush TSRMLS
OG(ob_nesting_level)--;
if (send_buffer) {
+ if (just_flush) { /* if flush is called prior to proper end, ensure presence of NUL */
+ final_buffer[final_buffer_length] = '\0';
+ }
OG(php_body_write)(final_buffer, final_buffer_length TSRMLS_CC);
}