Skip to Content.
Sympa Menu

freetds - Re: 0.50 alignment errors in convert.c

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • 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:
>
>
>





Archive powered by MHonArc 2.6.24.

Top of Page