freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] [PATCH] Problem with VARCHAR in sybase.
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] [PATCH] Problem with VARCHAR in sybase.
- Date: Sun, 6 Jul 2008 08:52:44 -0400
Eddy Pronk wrote:
> The way I solved it for now inside libdbi right now is like this:
>
> case CS_CHAR_TYPE:
> case CS_TEXT_TYPE:
> case CS_VARCHAR_TYPE:
> _type = DBI_TYPE_STRING;
> datafmt->format = CS_FMT_NULLTERM;
> ++datafmt->maxlength; /* 1 extra byte for \0 */
> break;
That will make ct-lib happy, but I would worry the cure might be worse
than the disease. If datafmt->maxlength represents the size of an
allocated buffer, increasing it without reallocating will write the NULL
to unallocated memory, with predictable unpredictable [sic] results.
Looking forward to your results.
--jkl
-
Re: [freetds] [PATCH] Problem with VARCHAR in sybase.,
Eddy Pronk, 07/01/2008
- <Possible follow-up(s)>
-
Re: [freetds] [PATCH] Problem with VARCHAR in sybase.,
Eddy Pronk, 07/03/2008
-
Re: [freetds] [PATCH] Problem with VARCHAR in sybase.,
James K. Lowden, 07/05/2008
-
Re: [freetds] [PATCH] Problem with VARCHAR in sybase.,
Eddy Pronk, 07/05/2008
-
Re: [freetds] [PATCH] Problem with VARCHAR in sybase.,
James K. Lowden, 07/06/2008
-
Re: [freetds] [PATCH] Problem with VARCHAR in sybase.,
Eddy Pronk, 07/07/2008
- Re: [freetds] [PATCH] Problem with VARCHAR in sybase., James K. Lowden, 07/07/2008
-
Re: [freetds] [PATCH] Problem with VARCHAR in sybase.,
Eddy Pronk, 07/07/2008
-
Re: [freetds] [PATCH] Problem with VARCHAR in sybase.,
James K. Lowden, 07/06/2008
- Re: [freetds] [PATCH] Problem with VARCHAR in sybase., James K. Lowden, 07/06/2008
-
Re: [freetds] [PATCH] Problem with VARCHAR in sybase.,
Eddy Pronk, 07/05/2008
-
Re: [freetds] [PATCH] Problem with VARCHAR in sybase.,
James K. Lowden, 07/05/2008
Archive powered by MHonArc 2.6.24.