Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to fix buffer overrun in psqlodbc driver
Message
From
18/09/2015 07:21:01
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
How to fix buffer overrun in psqlodbc driver
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01624769
Message ID:
01624769
Views:
69
Visual FoxPro application calls Postgres official psqlodbc driver 9.3.0400 using
nRes =SQLEXEC(m.g_server.nConnhandle, m.cStr, m.cCursor, aRowCount)
Both are 32 bit application running in Windows 7 x64

This call causes Buffer Ovverrun exception in psqlodbc35w.dll with stack trace below.
How to fix the issue ? psqlodbc is open source applicaton written in C and probably compiled by Visual Studio., maybe it is possible to chnage it in some was so that exceptino does not occur ?
Visual Studio 2015 Community Edition is installed.

After crash Visual Studio 2015 Community Edition debugger is invoked.
It shows stack trace:
    >    psqlodbc35w.dll!__crt_debugger_hook()     Unknown
         psqlodbc35w.dll!__report_gsfailure()  Line 315 + 0x7 bytes    C
         psqlodbc35w.dll!SC_create_errorinfo(const StatementClass_ * self)  Line 1423 + 0xa bytes    C
         psqlodbc35w.dll!PGAPI_StmtError(void * hstmt, short RecNumber, unsigned char * szSqlState, long * pfNativeError, unsigned char * szErrorMsg, short cbErrorMsgMax, short * pcbErrorMsg, unsigned short flag)  Line 1612    C
         psqlodbc35w.dll!PGAPI_GetDiagField(short HandleType, void * Handle, short RecNumber, short DiagIdentifier, void * DiagInfoPtr, short BufferLength, short * StringLengthPtr)  Line 280    C
         psqlodbc35w.dll!SQLGetDiagFieldW(short fHandleType, void * handle, short iRecord, short fDiagField, void * rgbDiagInfo, short cbDiagInfoMax, short * pcbDiagInfo)  Line 374 + 0x16 bytes    C
         odbc32(dot)dll!_VFreeErrors(at)4()  + 0x401f bytes    
         odbc32(dot)dll!_SearchStatusCode(at)8()  + 0x25 bytes    
         odbc32(dot)dll!_IsStmtPositioned(at)4()  + 0x14 bytes    
         odbc32(dot)dll!_SQLExecute(at)4()  - 0xfd3e bytes    
         odbc32(dot)dll!_SQLExecDirect(at)12()  + 0x77 bytes    
         vfp9r.dll!0c3904c6()     
    ...
Debug window shows lot of loaded moduled and at end:
    ...
    The thread 'Win32 Thread' (0x2778) has exited with code 0 (0x0).
    A buffer overrun has occurred in alguss.EXE which has corrupted the program's internal state. Press Break to debug the program or Continue to terminate the program.
    For more details please see Help topic 'How to debug Buffer Overrun Issues'.
Posted also in http://www.postgresql.org/message-id/1B88854920C942948F943E26B452E3A4@dell2 and in http://stackoverflow.com/questions/32650613/how-to-fix-buffer-overrun-in-psqlodbc-driver

I installed VFP Hotfix from CodePlex VFPX site but problem persists.
Andrus
Next
Reply
Map
View

Click here to load this message in the networking platform