freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Brian Bruns <camber AT umcc.ais.org>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: 0.50 alignment errors in convert.c
- Date: Tue, 21 Dec 1999 06:16:42 -0500 (EST)
funny, the code was all in there to do it, just forgot to put it in :-)
Thanks for the patch
Brian
On Tue, 21 Dec 1999, Anthony Baxter wrote:
> 0.50 was built on Solaris 2.7 sparc with gcc and
> ./configure --tds-version=4.2 --msdblib
>
> when running a query that returns an int as a varchar (eg
> select count(*) from accounts
> there's a sigbus-causing alignment error in src/tds/convert.c
>
> Patch:
> --- convert.c.orig Tue Dec 21 15:32:25 1999
> +++ convert.c Tue Dec 21 15:33:06 1999
> @@ -289,7 +289,7 @@
> switch(desttype) {
> case SYBCHAR:
> case SYBVARCHAR:
> - sprintf(tmp_str,"%d",*((TDS_SMALLINT *) src));
> + sprintf(tmp_str,"%d",*((TDS_SMALLINT *) buf));
> any.c = tmp_str;
> break;
> case SYBINT1:
> @@ -314,7 +314,7 @@
> switch(desttype) {
> case SYBCHAR:
> case SYBVARCHAR:
> - sprintf(tmp_str,"%ld",*((TDS_INT *) src));
> + sprintf(tmp_str,"%ld",*((TDS_INT *) buf));
> any.c = tmp_str;
> break;
> case SYBINT1:
>
>
>
-
0.50 alignment errors in convert.c,
Anthony Baxter, 12/20/1999
- <Possible follow-up(s)>
- Re: 0.50 alignment errors in convert.c, Brian Bruns, 12/21/1999
Archive powered by MHonArc 2.6.24.