mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-26 19:30:21 +00:00
Clear GCC overflow warning
This commit is contained in:
parent
c2bd7efb49
commit
9bb6680cfa
@ -111,6 +111,9 @@ void InvertibleESIGNFunction::GenerateRandom(RandomNumberGenerator &rng, const N
|
||||
|
||||
if (param.GetValue("Seed", seedParam))
|
||||
{
|
||||
if (seedParam.size() > seed.ELEMS_MAX - 4)
|
||||
throw InvalidArgument("InvertibleESIGNFunction::GenerateRandom: buffer overflow");
|
||||
|
||||
seed.resize(seedParam.size() + 4);
|
||||
std::memcpy(seed + 4, seedParam.begin(), seedParam.size());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user