From 0408e536792775417c6b19b20d64d60a3f929469 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Wed, 24 Aug 2005 16:19:47 +0000 Subject: [PATCH] Remainder of the 34191 bug fix. --- main/output.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/output.c b/main/output.c index 702044282fe..ed986233a2b 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); }