From: | "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> |
---|---|
To: | <pgsql-odbc(at)postgresql(dot)org> |
Cc: | "Didier Moens" <moensd(at)xs4all(dot)be> |
Subject: | SQLGetInfo Bug |
Date: | 2003-01-02 12:50:07 |
Message-ID: | 03AF4E498C591348A42FC93DEA9661B88546@mail.vale-housing.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
I've been working with Didier Moens to try to fix the bug detailed at https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=80394.
As I said towards the end, the error is caused by an overflow of the tmp buffer in PGAPI_GetInfo in info.c for which I have committed a change doubling it's size to 256 bytes. I also tried using snprintf instead of sprintf for safety:
snprintf(tmp, sizeof(tmp) - 1, "%s %s", POSTGRESDRIVERVERSION, conn->pg_version);
but somewhere along the way garbage is getting appended back on the string returned:
[328][SQLGetInfo][328]PGAPI_GetInfo: entering...fInfoType=18
[328]PGAPI_GetInfo: p='07.02.0005 PostgreSQL 7.3 on i386-redhat-linux-gnu, compiled by GCC i386-redhat-linux-gcc (GCC) 3.2.1 20021207 (Red Hat Linux 8wãF¸8Ù', len=0, value=0, cbMax=0
I can't see what the heck I've done wrong here. Any ideas?
Cheers, Dave.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-01-02 14:35:58 | Re: SQLGetInfo Bug |
Previous Message | Tambet Matiisen | 2003-01-02 08:31:29 | Re: ODBC - adding missing FROM clause entry |