-
Notifications
You must be signed in to change notification settings - Fork 203
Description
The code to write the debug message in lines 2357, 2381, line 2395, are incorrect as "database" is a SQLWCHAR which cannot be printed by snprintf:
snprintf(messageStr, sizeof(messageStr), "SQLConnectW called with parameters: conn_res->hdbc=%p, database=%ls, databaseLen=%zd, uid=%ls, uidLen=%zd, password=%ls, passwordLen=%zd and returned rc=%d", (void *)conn_res->hdbc, database,
Python code to reproduce:
ibm_db.debug(True)
conn = ibm_db.connect('DSN=RS01PDS1;AUTOCOMMIT=1;BLA=47;', '', '')
This debug statement is printed correct:
[INFO] - Received arguments: ('DSN=RS01PDS1;AUTOCOMMIT=1;BLA=47;', '', '')
but this one is not:
[DEBUG] - SQLDriverConnectW called with parameters: conn_res->hdbc=1, SQLHWND=NULL, database=S=S1D1ATCMI=;L=7
Notice that "database" is printed incorrectly - it seems like only every second character is printed correctly.