From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | Andrus <kobruleht2(at)hot(dot)ee>, pgsql-odbc(at)postgresql(dot)org |
Subject: | Re: How to fix buffer overrun in Windows x32 |
Date: | 2015-09-22 12:45:06 |
Message-ID: | 56014D52.1040000@iki.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
On 09/22/2015 11:03 AM, Andrus wrote:
> Hi!
>
>> Can you create a little test program to reproduce that? That would be best.
>> If that's not possible, please enable the Debug option for the datasource,
>> and send over the log.
>
> Testcase is
>
> http://stackoverflow.com/questions/32650613/how-to-fix-buffer-overrun-in-psqlodbc-driver
>
> If you dont have VFP you can copy postgresql code from it and pass to odbc
> execdirect in C or other language.
> I uploaded logs week ago to odbc issue tracker into one old closed issue.
Ah, found it finally! There was a buffer overflow of two bytes, in
SC_create_errorinfo() function. Apparently that didn't cause a crash on
other platforms, but that was just luck. The overflow happened if the
error message was longer than 4096 bytes.
Fixed, thanks for the report! I also added a test case for that to the
regression suite.
- Heikki
From | Date | Subject | |
---|---|---|---|
Next Message | Naoya Anzai | 2015-09-24 01:02:53 | Re: [BUGS] There is a case in which psqlodbc-09.03.0400 returns unterminated strings on Windows. |
Previous Message | Andrus | 2015-09-22 08:03:34 | Re: How to fix buffer overrun in Windows x32 |