Small patch which fixes the ODBC driver so it doesn't segfault if:

Bruce Momjian <bruce@momjian.us>

Commit: 63d7df4003beddf12a88938a9c34f7680103d683
Author: Bruce Momjian <bruce@momjian.us>
Date: 1999-11-29T23:42:03Z
Releases: 7.1.1
Small patch which fixes the ODBC driver so it doesn't segfault if:
You have CommLog and Debug enabled
You encounter in error in any operation (SQLConnect/SQLExec).
Previously, the extra logging didn't check for NULL pointers
when trying to print some of the strings- the socket error
message could frequently be NULL by design (if there was no socket
error)
and Solaris does not handle NULLS passed to things like printf
("%s\n",string);
gracefully.
This basically duplicates the functionality found in Linux where passing
a null pointer
to printf prints "(NULL)". No very elegant, but the logging is for debug
only anyway.

Dirk Niggemann

Files

PathChange+/−
src/interfaces/odbc/connection.c modified +10 −3
src/interfaces/odbc/statement.c modified +12 −7