diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-09-28 22:57:59 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-09-28 22:58:16 +0200 |
commit | f1d8395c773854c5d8a2a39241750e636e95d92c (patch) | |
tree | ca99f40c5397c6ac4dc369334a451664c443f97f /ext/pdo_odbc/odbc_driver.c | |
parent | ef385e806f8bf7977cf7f8c61d6915553c02c385 (diff) | |
parent | 6acfb79276809d70bafe91a45267c8a307ca900d (diff) | |
download | php-git-f1d8395c773854c5d8a2a39241750e636e95d92c.tar.gz |
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #67465: NULL Pointer dereference in odbc_handle_preparer
Diffstat (limited to 'ext/pdo_odbc/odbc_driver.c')
-rw-r--r-- | ext/pdo_odbc/odbc_driver.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c index 9e10c4c446..25cfd56f26 100644 --- a/ext/pdo_odbc/odbc_driver.c +++ b/ext/pdo_odbc/odbc_driver.c @@ -179,6 +179,8 @@ static int odbc_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_len, return 0; } + stmt->driver_data = S; + cursor_type = pdo_attr_lval(driver_options, PDO_ATTR_CURSOR, PDO_CURSOR_FWDONLY); if (cursor_type != PDO_CURSOR_FWDONLY) { rc = SQLSetStmtAttr(S->stmt, SQL_ATTR_CURSOR_SCROLLABLE, (void*)SQL_SCROLLABLE, 0); @@ -197,7 +199,6 @@ static int odbc_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_len, efree(nsql); } - stmt->driver_data = S; stmt->methods = &odbc_stmt_methods; if (rc != SQL_SUCCESS) { |