tony2001 Tue Mar 29 12:23:37 2005 EDT
Modified files:
/php-src/ext/pdo pdo.c
Log:
fix segfault & buffer overrun when there is no PDO drivers plugged in
(patch by [EMAIL PROTECTED])
http://cvs.php.net/diff.php/php-src/ext/pdo/pdo.c?r1=1.47&r2=1.48&ty=u
Index: php-src/ext/pdo/pdo.c
diff -u php-src/ext/pdo/pdo.c:1.47 php-src/ext/pdo/pdo.c:1.48
--- php-src/ext/pdo/pdo.c:1.47 Tue Mar 22 05:36:25 2005
+++ php-src/ext/pdo/pdo.c Tue Mar 29 12:23:36 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo.c,v 1.47 2005/03/22 10:36:25 helly Exp $ */
+/* $Id: pdo.c,v 1.48 2005/03/29 17:23:36 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -410,9 +410,11 @@
ldrivers = drivers;
}
- php_info_print_table_row(2, "PDO drivers", drivers+2);
-
- efree(drivers);
+ php_info_print_table_row(2, "PDO drivers", drivers ? drivers+2 : "");
+
+ if (drivers) {
+ efree(drivers);
+ }
php_info_print_table_end();
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php