Null-terminate BnetSRP3::username and BnetSRP3::password in BnetSRP3::init().

This commit is contained in:
relesgoe 2020-12-03 20:31:31 -08:00
parent 7dc0a62465
commit ce6d30f361

View file

@ -81,6 +81,7 @@ namespace pvpgn
{
*(symbol++) = std::toupper(static_cast<unsigned char>(*(source++)));
}
*(symbol++) = '\0';
if (!((password_ == NULL) ^ (salt_ == NULL))) {
eventlog(eventlog_level_error, __FUNCTION__, "need to init with EITHER password_ OR salt_");
@ -96,6 +97,7 @@ namespace pvpgn
{
*(symbol++) = std::toupper(static_cast<unsigned char>(*(source++)));
}
*(symbol++) = '\0';
a = BigInt::random(32) % N;
s = BigInt::random(32);
}