Skip to content

Commit

Permalink
don't use the output printf buffer as a %s parameter
Browse files Browse the repository at this point in the history
followup for ebcb9ec
  • Loading branch information
vuvova committed Feb 4, 2024
1 parent 9aa15e7 commit 830d137
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libmariadb/mariadb_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1808,10 +1808,14 @@ MYSQL *mthd_my_real_connect(MYSQL *mysql, const char *host, const char *user,
else if (IS_MYSQL_ERROR(code) || IS_MARIADB_ERROR(code))
; /* not forged - generated on the client side */
else if (mysql->options.use_ssl)
{
char last_error[sizeof(mysql->net.last_error)];
strcpy(last_error, mysql->net.last_error);
my_set_error(mysql, CR_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
"Received error packet before completion of TLS handshake. "
"The authenticity of the following error cannot be verified:\n%d - %s",
code, mysql->net.last_error);
"The authenticity of the following error cannot be verified: %d - %s",
code, last_error);
}

goto error;
}
Expand Down

0 comments on commit 830d137

Please sign in to comment.