cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd_wireprotocol.c
| From: | Andrey Hristov | Date: | Thu, 11 Jun 2009 08:35:47 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd_wireprotocol.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-58623@lists.php.net to get a copy of this message | ||
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;
}