freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Brian Bruns" <camber AT ais.org>
- To: freetds AT franklin.oit.unc.edu
- Subject: RE: Losing last character of TEXT fields
- Date: Tue, 9 Jul 2002 11:47:01 -0400
It think the root cause may be deeper. Why is a short destlen being asked
for? This may have something to do with the return value of dbdatlen() or
similar calls... ie the application code may be:
mylen = dbdatlen(dbproc, colnum);
mybuf = malloc(mylen);
dbconvert(dbproc,..., mybuf, mylen);
So by fixing dbdatlen() or whichever it turns out to be, we may get an
extra char *and* no buffer problem.
Brian
> I think you're right, Frediano; the code is still broken.
>
> We shouldn't null-terminate unless destlen is -1. If the destination buffer
> is too small, we should call the error handler and return -1. So say the
> docs. Eric?
>
> --jkl
-
Losing last character of TEXT fields,
L J Bayuk, 07/07/2002
- <Possible follow-up(s)>
- RE: Losing last character of TEXT fields, Lowden, James K, 07/08/2002
- RE: Losing last character of TEXT fields, Eric Deutsch, 07/08/2002
- RE: Losing last character of TEXT fields, Brian Bruns, 07/08/2002
- RE: Losing last character of TEXT fields, Lowden, James K, 07/08/2002
- RE: Losing last character of TEXT fields, James K. Lowden, 07/08/2002
- RE: Losing last character of TEXT fields, ZIGLIO Frediano, 07/09/2002
- RE: Losing last character of TEXT fields, Bill Thompson, 07/09/2002
- RE: Losing last character of TEXT fields, Lowden, James K, 07/09/2002
- RE: Losing last character of TEXT fields, Bill Thompson, 07/09/2002
- RE: Losing last character of TEXT fields, Brian Bruns, 07/09/2002
- RE: Losing last character of TEXT fields, Lowden, James K, 07/09/2002
- RE: Losing last character of TEXT fields, Eric Deutsch, 07/09/2002
- RE: Losing last character of TEXT fields, Brian Bruns, 07/09/2002
- RE: Losing last character of TEXT fields, Eric Deutsch, 07/09/2002
- RE: Losing last character of TEXT fields, Michael Peppler, 07/09/2002
- RE: Losing last character of TEXT fields, Lowden, James K, 07/09/2002
- RE: Losing last character of TEXT fields, Eric Deutsch, 07/09/2002
- RE: Losing last character of TEXT fields, Lowden, James K, 07/09/2002
- RE: Losing last character of TEXT fields, Eric Deutsch, 07/09/2002
- RE: Losing last character of TEXT fields, Brian Bruns, 07/09/2002
Archive powered by MHonArc 2.6.24.