summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2005-03-29 17:23:36 (GMT)
committerAntony Dovgal <tony2001@php.net>2005-03-29 17:23:36 (GMT)
commite499a1c2966e1d4dd6792b5e8e1364bb8ed8b720 (patch)
tree6100ec85d48f70c32f92eaf06de287f0f8c8d8d5 /ext
parent29ede46872a2d3b79839359a25b2136ca8c92896 (diff)
downloadphp-e499a1c2966e1d4dd6792b5e8e1364bb8ed8b720.tar.gz
fix segfault & buffer overrun when there is no PDO drivers plugged in
(patch by su1d@phpclub.net)
Diffstat (limited to 'ext')
-rwxr-xr-xext/pdo/pdo.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c
index 2c98403..fc3216c 100755
--- a/ext/pdo/pdo.c
+++ b/ext/pdo/pdo.c
@@ -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();