andrey          Thu Jun 11 08:35:47 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/mysqlnd        mysqlnd_wireprotocol.c 
  Log:
  MFH:
    Check the pointer before calling a function on it, or we will crash.
    This is a very rare situation where the server is totally broken.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_wireprotocol.c?r1=1.4.2.26&r2=1.4.2.27&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_wireprotocol.c
diff -u php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.4.2.26 
php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.4.2.27
--- php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.4.2.26 Thu Jun 11 08:30:08 2009
+++ php-src/ext/mysqlnd/mysqlnd_wireprotocol.c  Thu Jun 11 08:35:47 2009
@@ -1343,7 +1343,7 @@
                        break;
                }
        }
-       if (ret == FAIL) {
+       if (ret == FAIL && (*buffer)) {
                (*buffer)->free_chunk((*buffer), TRUE TSRMLS_CC);
                *buffer = NULL;
        }



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

Reply via email to