freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Brian Bruns <camber AT ais.org>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: Domain Logins and 0.52 tasks
- Date: Mon, 18 Jun 2001 19:18:31 -0400 (EDT)
Well, the code is quite obviously wrong. It happened with a whole slew
of other changes fixing some other similar truncation issues. (convert.c
version 1.45 to 1.46 if anyone is interested around Feb 13th this year)
I've checked the patch into CVS. Thanks for reminding me...I almost
dropped the patch. ;-)
Brian
On Mon, 18 Jun 2001, James Cameron wrote:
> 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?
>
>
-
Domain Logins and 0.52 tasks,
Brian Bruns, 06/13/2001
- <Possible follow-up(s)>
- Re: Domain Logins and 0.52 tasks, Eric Deutsch, 06/15/2001
- Re: Domain Logins and 0.52 tasks, James K. Lowden, 06/17/2001
- Re: Domain Logins and 0.52 tasks, James Cameron, 06/18/2001
- Re: Domain Logins and 0.52 tasks, Eric Deutsch, 06/19/2001
- Re: Domain Logins and 0.52 tasks, Brian Bruns, 06/19/2001
Archive powered by MHonArc 2.6.24.