Prevent possible use of uninitialized variable in _client_createaccountw3()
This commit is contained in:
parent
8c2c82a162
commit
f0ad3fae24
1 changed files with 4 additions and 4 deletions
|
@ -672,7 +672,6 @@ namespace pvpgn
|
|||
t_packet *rpacket;
|
||||
char const *username;
|
||||
char const *plainpass;
|
||||
char lpass[20];
|
||||
t_hash sc_hash;
|
||||
unsigned int i;
|
||||
const char *account_salt;
|
||||
|
@ -737,10 +736,11 @@ namespace pvpgn
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (plainpass) {
|
||||
char lpass[20] = {};
|
||||
if (plainpass)
|
||||
{
|
||||
/* convert plaintext password to lowercase for sc etc. */
|
||||
std::strncpy(lpass, plainpass, 16);
|
||||
lpass[16] = 0;
|
||||
std::snprintf(lpass, sizeof lpass, "%s", plainpass);
|
||||
strtolower(lpass);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue