Skip to Content.
Sympa Menu

freetds - Re: Domain Logins and 0.52 tasks

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: James Cameron <cameron AT stl.dec.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Domain Logins and 0.52 tasks
  • Date: Mon, 18 Jun 2001 09:47:09 +1000


This code fragment looks familiar. Didn't we review this on the mailing
list?

Eric Deutsch wrote:
> 2) Under both TDS 4.2 and 7.0, the final character of a datatype TEXT
> field is truncated. Last-digit truncation has a long history here, but I
> think this is a new problem. I was able to fix it with the following
> patch:
> *** convert.c:orig Mon Mar 19 16:20:37 2001
> --- convert.c Fri Jun 15 16:46:51 2001
> ***************
> *** 98,102 ****
> cplen = srclen > destlen ? destlen : srclen;
> memcpy(dest, src, cplen);
> ! dest[cplen-1] = '\0';
> return strlen(dest);
> case SYBCHAR:
> --- 98,103 ----
> cplen = srclen > destlen ? destlen : srclen;
> memcpy(dest, src, cplen);
> ! /* 2001-06-15 Deutsch changed [cplen-1] to [cplen] */
> ! dest[cplen] = '\0';
> return strlen(dest);
> case SYBCHAR:
>
> The line in question appears to be new since 0.51. This looks like a bug
> that needs to be fixed, but maybe this breaks some other client+server
> combination?

--
James Cameron




Archive powered by MHonArc 2.6.24.

Top of Page