]> granicus.if.org Git - php/commitdiff
Remainder of the 34191 bug fix.
authorIlia Alshanetsky <iliaa@php.net>
Wed, 24 Aug 2005 16:19:47 +0000 (16:19 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 24 Aug 2005 16:19:47 +0000 (16:19 +0000)
main/output.c

index 702044282fe3353bd922ad21f3beef315224f0b7..ed986233a2b950f596a586944cfb7336653f8a44 100644 (file)
@@ -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);
        }