freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Anthony Baxter <anthony AT ekit-inc.com>
- To: freetds AT franklin.oit.unc.edu
- Subject: 0.50 alignment errors in convert.c
- Date: Tue, 21 Dec 1999 15:38:34 +1100
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.