Share

FreeTDS

Tracker: Bugs

5 [amd64] _SQLGetStmtAttr() memory corruption - ID: 2660558
Last Update: Tracker Item Submitted ( mclap )

_SQLGetStmtAttr() uses size_t internaly, but should use SQLUINTEGER.

Size of SQLUINTEGER is 4 bytes at FreeBSD/amd64 platform, but size of
size_t is 8 !!! So in some cases it can lead to stack corruption.

Problem was introduced at revision 1.226 of odbc.c by Steve Murphree patch
which was merged at Thu Aug 28 16:03:56 2003 UTC.

Sounds like nobody never run odbc/unittests/attributes.c test under amd64.
It pass pointer to SQLINTEGER type as parameter to _SQLGetStmtAttr().


Pavel Plesov ( mclap ) - 2009-03-04 08:03

5

Open

None

Nobody/Anonymous

odbc

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.