[unixODBC-dev] segfault

Peter Harvey pharvey at peterharvey.org
Tue Oct 30 08:10:23 GMT 2012


Hey Nick,

Playing around with an ODBC problem. Possible bug in unixODBC. Built
sqliteodbc3 driver without wchar support (oversight) and then had my app
(which is built for UNICODE) call;

SQLPrepare
SQLExecute (fails as I expect)

Then the following segafults... 

SQLGetDiagField( nType, hHandle, 0, SQL_DIAG_DYNAMIC_FUNCTION, NULL, 0, &nChars );

This seems to be caused by using a null function pointer in the function array - presumably because the driver does not have SQLGetDiagFieldW. I would think that the DM would check for null function pointer.

Let me know if you want me to fix this (ie in the sourceforge repo).

--
Cheers
Peter
BTW: I know that I should expect SQL_ERROR from the SQLGetDiagField call in this case - just not a segfault ;)
 

 


More information about the unixODBC-dev mailing list