Skip to Content.
Sympa Menu

freetds - Re: [freetds] bug found/fixed

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] bug found/fixed
  • Date: 02 Jan 2003 21:05:19 +0100

Il gio, 2003-01-02 alle 19:22, Steven Reynolds ha scritto:
> 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?
>

Fixed, I redeclared param_lenbind as SQLINTEGER* and did some cleanup

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page