Fix uninitialized tmp_charset in Data_Stream constructors

Initialize tmp_charset=0 in MySQL_Data_Stream and PgSQL_Data_Stream
constructors. This field was used uninitialized in
process_pkt_handshake_response() when calling proxy_debug(), causing
Valgrind errors about uninitialized values in vsnprintf.
v3.0-test0213
Rene Cannao 1 week ago
parent 7c67eb25f1
commit 09d0dcb808

@ -256,6 +256,7 @@ PgSQL_Data_Stream::PgSQL_Data_Stream() {
encrypted = false;
switching_auth_stage = 0;
switching_auth_type = 0;
tmp_charset = 0;
x509_subject_alt_name = NULL;
ssl = NULL;
rbio_ssl = NULL;

@ -261,6 +261,7 @@ MySQL_Data_Stream::MySQL_Data_Stream() {
switching_auth_type = AUTH_UNKNOWN_PLUGIN;
switching_auth_sent = AUTH_UNKNOWN_PLUGIN;
auth_in_progress = 0;
tmp_charset = 0;
x509_subject_alt_name=NULL;
ssl=NULL;
rbio_ssl = NULL;

Loading…
Cancel
Save