fix segfault & buffer overrun when there is no PDO drivers plugged in

(patch by su1d@phpclub.net)
This commit is contained in:
Antony Dovgal 2005-03-29 17:23:36 +00:00
parent 29ede46872
commit e499a1c296

View File

@ -410,9 +410,11 @@ PHP_MINFO_FUNCTION(pdo)
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();