Skip to Content.
Sympa Menu

freetds - Re: [freetds] Segmentation fault in DBLIB - SETUSER/SETPWD

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Segmentation fault in DBLIB - SETUSER/SETPWD
  • Date: Thu, 20 Sep 2007 09:14:36 +0200

>
> I don't know what the "cstb" is in reference to, but I have
> found a simple example written in C that allows my program to
> change the username and password. I had been reading many
> conflicting examples that included combinations of sybdb.h,
> tds.h, and dblib.h. Using only sybdb made my code simpler
> and allowed the message handler to run. Thank you for your help.
>

0x63737462 is "cstb" (or "btsc" depending on byte order).
It's quite strange that a pointer is composed only by lower case
bytes... it seems a corruption or a wrong structure use. I think source
for DBConnection::connect would help.

Does a simple code like

dbopen
dblogin
DBSETLUSER

works??

freddy77

> -----Original Message-----
> >
> > In reference to my previous email, I found the link to the
> original topic
> > from July 2003.
> >
> > https://lists.ibiblio.org/sympa/arc/freetds/2003q3/013444.html
> >
> > I have narrowed down the problem to the following places using GDB:
> >
> > For SETUSER:
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread -1208211776 (LWP 30863)]
> > tds_dstr_copy (s=0x6373748a, src=0xbffd0700 "XXXXX\t") at
> tdsstring.c:126
> >
> > 126 if (*s != (DSTR) &tds_str_empty)
> > #0 tds_dstr_copy (s=0x6373748a, src=0xbffd0700 "XXXXX\t")
> > at tdsstring.c:126
> > #1 0x00325e2a in tds_set_user (tds_login=0x63737462,
> > username=0xbffd0700 "XXXXX\t") at login.c:94
>
>
> tds_login == 0x63737462 ???
> "cstb" ??? where does this pointer came??
>
> #2 0x003106ec in dbsetlname (login=0xbffd0500,
> value=0xbffd0700 "XXXXX\t",
> > which=2) at dblib.c:441
>
>




Archive powered by MHonArc 2.6.24.

Top of Page