summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-08-24 16:19:57 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-08-24 16:19:57 +0000
commit30b14ee8e996913622f1bdaea239de14ef3a41d7 (patch)
tree092374ae0d1f4ea63717a69e5dc727604d2df3b5 /main
parente96c51a175d4e3ca860ef921b7be66141726a378 (diff)
downloadphp-git-30b14ee8e996913622f1bdaea239de14ef3a41d7.tar.gz
MFH: Remainder of the 34191 bug fix.
Diffstat (limited to 'main')
-rw-r--r--main/output.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/output.c b/main/output.c
index b197cb48b5..6880ada6a2 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);
}