[ODBC-110] Unbinding columns after execution and before fetching new result causes crash in the connector Created: 2017-08-27  Updated: 2017-08-28  Resolved: 2017-08-28

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: None
Affects Version/s: 3.0.1
Fix Version/s: 3.0.2

Type: Bug Priority: Major
Reporter: Lawrin Novitsky Assignee: Lawrin Novitsky
Resolution: Fixed Votes: 0
Labels: None


 Description   

Summary is pretty descriptive. The testcase
ODBC_TEST(t_unbind_before_fetch)

{ SQLUINTEGER dummy; OK_SIMPLE_STMT(Stmt, "SELECT 1"); CHECK_STMT_RC(Stmt, SQLFreeStmt(Stmt, SQL_UNBIND)); CHECK_STMT_RC(Stmt, SQLBindCol(Stmt, 1, SQL_C_ULONG, &dummy, 0, NULL)); CHECK_STMT_RC(Stmt, SQLFetchScroll(Stmt, SQL_FETCH_NEXT, 1)); return OK; }

Crash occurs in the call of SQLFetchScroll. Can be SQLFetch, as well.
Affects (at least) Microsoft ODBC test tool. 2.0 doesn't seem to be vulnerable



 Comments   
Comment by Lawrin Novitsky [ 2017-08-28 ]

The fix and the testcase have been pushed in the commit 860e7f8b754fa087008141646a2c838cecedf9a3

Generated at Thu Feb 08 03:26:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.