Increasing LOG_MESSAGE_LEN causes buffer overflow/crash
Brought to you by:
lurcher,
peteralexharvey
A hard-coded buffer size in
DriverManager/SQLExecDirect.c causes a Segmentation
Violation at line 230 if you increase the log message
length in
DriverManager/drivermanager.h and then enable tracing
in the /usr/local/etc/odbcinst.ini.
For example, increasing the length of logged message to
2000 bytes like this:
#define LOG_MESSAGE_LEN 2000
will cause a segmentation violation. The problem
appears to be a hard-coded length of 101 for a buffer
in SQLExecDirect.c, which should probably be
LOG_MESSAGE_LEN instead.
Logged In: YES
user_id=7184
Yes, its a bug, well found. I will fix this now.