Bug #28758 SQLNativeSql unsafely casts SQLINTEGER * to SQLLEN *
Submitted: 30 May 2007 0:04 Modified: 6 Jun 2007 13:55
Reporter: Jim Winstead
Status: Closed
Category:Connector/ODBC Severity:S3 (Non-critical)
Version:3.51.15 OS:Any
Assigned to: Jim Winstead Target Version:
Tags: 64-bit, SQLNativeSql

[30 May 2007 0:04] Jim Winstead
Description:
The implementation of SQLNativeSql casts its last argument (an SQLINTEGER *) to an SQLLEN
* when calling copy_lresult. This is bad, because SQLLEN and SQLINTEGER are different
sizes on 64-bit platforms.

How to repeat:
Inspect the code.

Suggested fix:
Use a local SQLLEN variable to handle the call to copy_lresult.
[30 May 2007 0:17] Jim Winstead
Fix bad cast of SQLINTEGER * to SQLLEN *

Attachment: bug28758.patch (text/plain), 1.96 KiB.

[31 May 2007 23:21] Jim Winstead
Committed, will be in 3.51.16.
[6 Jun 2007 13:54] MC Brown
Internal change, no documentation required.
[6 Jun 2007 13:55] MC Brown
Closing bug.