andrey Thu Jun 11 08:32:34 2009 UTC
Modified files:
/php-src/ext/mysqlnd mysqlnd_wireprotocol.c
Log:
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.27&r2=1.28&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_wireprotocol.c
diff -u php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.27
php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.28
--- php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.27 Mon Jun 8 10:19:29 2009
+++ php-src/ext/mysqlnd/mysqlnd_wireprotocol.c Thu Jun 11 08:32:34 2009
@@ -1344,7 +1344,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