[unixODBC-dev] A core dump issue in __connect_part_one function

xiaonan xn212516 at 163.com
Wed Apr 10 10:17:05 BST 2013

 Hi, Nick:

    Sorry for interrupting you!
    When I using unixODBC, there will be core dump sometimes. The cause is in __connect_part_one and __connect_part_two functions:
    if ( !(connection -> dl_handle = odbc_dlopen( driver_lib )))
            char txt[ 2048 ];

            sprintf( txt, "Can't open lib '%s' : %s",
                    driver_lib, lt_dlerror());
         The lt_dlerror() return value is NULL.
         Because lt_dlerror() can return NULL, I think we should justify the return value of lt_dlerror before using sprintf.
         BTW, I think LT__GETERROR and LT__SETERRORSTR are not thread-safe, so the return value of lt_dlerror can be NULL.
Best Regards
Nan Xiao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-dev/attachments/20130410/42e25a03/attachment.html>

More information about the unixODBC-dev mailing list