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

index b197cb48b5c78a0f73cfed27350930a07a353252..6880ada6a23821dd2bc39d7a060c9f3d070ea939 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);
        }