tony2001                Thu Apr 28 10:20:56 2005 EDT

  Modified files:              (Branch: PHP_5_0)
    /php-src/main       output.c 
  Log:
  MFH: fix #32828 (Throwing exception in output_callback function with ob_start 
and
  ob_end_clean leads to segfault)
  
  
http://cvs.php.net/diff.php/php-src/main/output.c?r1=1.164&r2=1.164.2.1&ty=u
Index: php-src/main/output.c
diff -u php-src/main/output.c:1.164 php-src/main/output.c:1.164.2.1
--- php-src/main/output.c:1.164 Sun Mar 14 18:56:07 2004
+++ php-src/main/output.c       Thu Apr 28 10:20:56 2005
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: output.c,v 1.164 2004/03/14 23:56:07 helly Exp $ */
+/* $Id: output.c,v 1.164.2.1 2005/04/28 14:20:56 tony2001 Exp $ */
 
 #include "php.h"
 #include "ext/standard/head.h"
@@ -238,7 +238,7 @@
                OG(ob_lock) = 1;
 
                if (call_user_function_ex(CG(function_table), NULL, 
OG(active_ob_buffer).output_handler, &alternate_buffer, 2, params, 1, NULL 
TSRMLS_CC)==SUCCESS) {
-                       if (!(Z_TYPE_P(alternate_buffer)==IS_BOOL && 
Z_BVAL_P(alternate_buffer)==0)) {
+                       if (alternate_buffer && 
!(Z_TYPE_P(alternate_buffer)==IS_BOOL && Z_BVAL_P(alternate_buffer)==0)) {
                                convert_to_string_ex(&alternate_buffer);
                                final_buffer = Z_STRVAL_P(alternate_buffer);
                                final_buffer_length = 
Z_STRLEN_P(alternate_buffer);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to