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:
Evan Miller
2021-01-21 18:27:20 -05:00
parent 848303f9f0
commit f1eac042b5
4 changed files with 4 additions and 4 deletions

View File

@@ -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;
}