A core dump issue in __connect_part_one function
xiaonan <[email protected]>
| Newsgroups | gmane.comp.db.unixodbc.devel |
|---|---|
| Message-ID | <[email protected]> |
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
_______________________________________________
unixODBC-dev mailing list
[email protected]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev