During my testing of the ODBC file I/O handler, I discovered an issue with one of the SQLBindCol
function calls. The int ind
variable is 4 bytes, whereas SQLLEN
is 8 bytes on a 64-bit machine. Passing (SQLPOINTER)&ind
to the function corrupted the SQLHSTMT stmtHndl
stack variable, which caused the COBOL program to crash with a SIGSEGV error.