mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-03-10 00:20:54 +08:00
Fix misuse of "%*s" in sprintf strings
%*s takes the output length, not the input length. The intended
specifier was %.*s in several places. Bug(s) introduced in
2bb31f05ee
This commit is contained in:
@@ -1225,7 +1225,7 @@ SQLRETURN SQL_API SQLPrepare(
|
||||
|
||||
TRACE("SQLPrepare");
|
||||
|
||||
snprintf(stmt->query, sizeof(stmt->query), "%*s", sqllen, (char*)szSqlStr);
|
||||
snprintf(stmt->query, sizeof(stmt->query), "%.*s", sqllen, (char*)szSqlStr);
|
||||
|
||||
return SQL_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user