[freetds] bug found/fixed

Steven Reynolds sreynolds at bradmark.com
Thu Jan 2 12:22:04 EST 2003


I found the following issue in
src/odbc/prepare_query.c

local> diff -c prepare_query.c prepare_query.c.cvs
*** prepare_query.c     Thu Jan  2 12:13:05 2003
--- prepare_query.c.cvs Sat Dec 28 13:50:58 2002
***************
*** 52,58 ****
        case SQL_BINARY:
        case SQL_VARBINARY:
        case SQL_BIT:
!                 len = *(SQLINTEGER *)(param->param_lenbind);
                break;
        case SQL_DATE:
                len = 15;
--- 52,58 ----
        case SQL_BINARY:
        case SQL_VARBINARY:
        case SQL_BIT:
!               len = *param->param_lenbind;
                break;
        case SQL_DATE:
                len = 15;

This was causing the calculated space for the prepared arguments
to be zero and resulting in heap corruption
(param_lenbind is a char*). Could someone with
cvs access please make the change to the cvs source?

Thanks!



More information about the FreeTDS mailing list