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