magnus Tue Mar 8 20:56:44 2005 EDT
Modified files:
/php-src/ext/pdo_oci oci_driver.c
Log:
Fix segv when einfo->errcode is not available.
Add missing NULL entry to oci_methods.
http://cvs.php.net/diff.php/php-src/ext/pdo_oci/oci_driver.c?r1=1.20&r2=1.21&ty=u
Index: php-src/ext/pdo_oci/oci_driver.c
diff -u php-src/ext/pdo_oci/oci_driver.c:1.20
php-src/ext/pdo_oci/oci_driver.c:1.21
--- php-src/ext/pdo_oci/oci_driver.c:1.20 Mon Feb 14 08:31:34 2005
+++ php-src/ext/pdo_oci/oci_driver.c Tue Mar 8 20:56:43 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci_driver.c,v 1.20 2005/02/14 13:31:34 tony2001 Exp $ */
+/* $Id: oci_driver.c,v 1.21 2005/03/09 01:56:43 magnus Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -46,8 +46,10 @@
}
}
- add_next_index_long(info, einfo->errcode);
- add_next_index_string(info, einfo->errmsg, 1);
+ if (einfo->errcode) {
+ add_next_index_long(info, einfo->errcode);
+ add_next_index_string(info, einfo->errmsg, 1);
+ }
return 1;
}
@@ -382,7 +384,8 @@
NULL,
pdo_oci_fetch_error_func,
NULL, /* get_attr */
- NULL /* check_liveness */
+ NULL, /* check_liveness */
+ NULL /* get_driver_methods */
};
static int pdo_oci_handle_factory(pdo_dbh_t *dbh, zval *driver_options
TSRMLS_DC) /* {{{ */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php