Skip to Content.
Sympa Menu

freetds - Re: Seg Faults in login.c; freetds version 0.53

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: Seg Faults in login.c; freetds version 0.53
  • Date: Mon, 29 Oct 2001 08:31:09 -0500 (EST)



Changes for this were checked in last week. If you update to CVS it should
be working.

Brian

On Sun, 28 Oct 2001, cori lynn arnold wrote:

> Hello, this message is for: Eric Deutsch, Richard Norman & Bill Rayburn
> (and everyone else getting a Seg Fault while trying to login).
>
> I hacked freetds version 0.51 to work on the sparc solaris 8 platform back
> in april, by manually reversing several bytes. I desired a cleaner way to
> use the sparc so i downloaded the 0.53 version noting comments on the
> release that big-endian now works.
>
> The symptom I noted in version 0.53 was a Seg Fault in login.c for TDS
> version 7.0 while doing a strlen(config->host_name). This happened on
> both the linux and sparc solaris 8.
>
> I've spent the weekend working on making this work for linux and solaris 8
> on sparc. I made changes in the tds7_send_login function only, and the
> 0.53 version now works beautifully on both platforms.
>
> here are the changes i made:
>
> after: if(!domain_login)
> remove: strlen(config->host_name) & strlen(config->language)
>
> after:/* host name */
> change: strlen(config->host_name)
> to: 0
> remove next line: current_pos += strlen(config->host_name)*2;
>
> after: /* language */
> change: strlen(config->language)
> to: 0
> remove next line: current_pos += strlen(language)*2;
>
> remove line: tds7_ascii2unicode(config->host_name, unicode_string,255);
> and next line: tds_put_n(tds,unicode_string,strlen(config->host_name)*2);
>
> remove line: tds7_ascii2unicode(config->language, unicode_string, 255);
> and next line: tds_put_n(tds,unicode_string,strlen(config->language)*2);
>
>
> This solution may look strange, but it had a methodology. I figured 0.51
> login worked so i made the 0.53 version login.c look the same. I hacked
> it on the linux box and moved the login.c file over to the sparc and
> everything worked, wonderfully!
>
> Thanks to the dev-freetds team for making the byte switching in the
> tds_put and tds_get functions a lot cleaner than my own.
>
> --cori lynn
>
> ---
> You are currently subscribed to freetds as: [camber AT ais.org]
> To unsubscribe, forward this message to $subst('Email.Unsub')
>





Archive powered by MHonArc 2.6.24.

Top of Page