freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Michael Peppler <mpeppler AT peppler.org>
- To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
- Subject: Re: [PHP4BETA] php4+freetds, off-by-1 truncation
- Date: Fri, 3 Dec 1999 18:11:34 -0800 (PST)
rasmus AT php.net writes:
> > Ok, this one is fixed and in CVS. Or you can patch your local copy
> > thusly:
> >
> > In src/tds/convert.c function tds_convert_any() change
> >
> > return(strlen(dest));
> >
> > to
> >
> > return (strlen(dest)+1);
> >
> > What happens is PHP uses length binding, which for strings should include
> > the null as well as the characters in the string. So, PHP cuts off what
> > it thinks in the NULL but is actually the last character. sqsh and
> > DBD::Sybase don't seem to rely on length binding and were uneffected by
> > this bug.
>
> Hrm, doesn't this mean that DBD::Sybase and sqsh are not 8-bit clean then?
No. I just use ct_bind() and let the internals do whatever they have
to. Exactly why this works for me and not for you I don't know...
Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler AT peppler.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list AT isug.com
-
Re: [PHP4BETA] php4+freetds, off-by-1 truncation
, (continued)
- Re: [PHP4BETA] php4+freetds, off-by-1 truncation, Christian Oyarzun, 12/02/1999
- Re: [PHP4BETA] php4+freetds, off-by-1 truncation, richard, 12/02/1999
- Re: [PHP4BETA] php4+freetds, off-by-1 truncation, Brian Bruns, 12/02/1999
- Re: [PHP4BETA] php4+freetds, off-by-1 truncation, Brian Zhou, 12/02/1999
- Re: [PHP4BETA] php4+freetds, off-by-1 truncation, richard, 12/02/1999
- Re: [PHP4BETA] php4+freetds, off-by-1 truncation, rasmus, 12/03/1999
- Re: [PHP4BETA] php4+freetds, off-by-1 truncation, Henry Lu, 12/03/1999
- Re: [PHP4BETA] php4+freetds, off-by-1 truncation, Brian Bruns, 12/03/1999
- Re: [PHP4BETA] php4+freetds, off-by-1 truncation, rasmus, 12/03/1999
- Re: [PHP4BETA] php4+freetds, off-by-1 truncation, Brian Bruns, 12/03/1999
- Re: [PHP4BETA] php4+freetds, off-by-1 truncation, Michael Peppler, 12/03/1999
- Re: [PHP4BETA] php4+freetds, off-by-1 truncation, richard, 12/05/1999
Archive powered by MHonArc 2.6.24.