We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e440685 commit 0b035e3Copy full SHA for 0b035e3
client/auth_utils.cc
@@ -85,7 +85,7 @@ int decrypt_login_cnf_file(istream &fin, ostream &sout)
85
int len;
86
char len_buf[MAX_CIPHER_STORE_LEN];
87
char cipher[MAX_CIPHER_LEN];
88
- fin.read(len_buf, 4);
+ fin.read(len_buf, MAX_CIPHER_STORE_LEN);
89
len= sint4korr(len_buf);
90
if (len == 0 || fin.eof())
91
break;
@@ -97,7 +97,7 @@ int decrypt_login_cnf_file(istream &fin, ostream &sout)
97
aes_length= my_aes_decrypt((const unsigned char *) cipher, len,
98
(unsigned char *) plain,
99
(const unsigned char *) rkey,
100
- MAX_CIPHER_LEN, my_aes_128_ecb, NULL);
+ LOGIN_KEY_LEN, my_aes_128_ecb, NULL);
101
if (aes_length > MAX_CIPHER_LEN)
102
return ERR_ENCRYPTION;
103
plain[aes_length]= 0;
0 commit comments