Skip to Content.
Sympa Menu

freetds - [freetds] ODBC Fix

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian_Teravskis AT cargill.com
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] ODBC Fix
  • Date: Wed, 26 Mar 2003 13:01:33 -0600

Hello all,

I'm not a developer, and I'm not part of this list, but I found a
problem in the ODBC interface of FreeTDS 0.61 that I thought I should
pass along.

I'm running on a Linux system using iODBC. I have the odbc.ini file
stored in the /etc directory. When I run the iODBC odbctest program I
get a segmentation fault pointing to a call to vasprintf located in the
odbc/connectparams.c file. After some fiddling around with a test
program using vasprintf() I came up with the following change to make it
work:

$ diff connectparams.c connectparams.c~
317c317
< if (vasprintf(&fn, "%s/.odbc.ini", &p) > 0) {
---
> if (vasprintf(&fn, "%s/.odbc.ini", p) > 0) {

** note the &p change. This is in the function tdoGetIniFileName()

I hope this helps someone out. If you need more information please
e-mail your request to me.

Regards,

Brian




Archive powered by MHonArc 2.6.24.

Top of Page