add overflow check to dropsAdded accumulator

This commit is contained in:
Richard Holland
2023-12-28 09:53:11 +00:00
parent 4ad697069f
commit 99b70c58b5

View File

@@ -302,6 +302,13 @@ GenesisMint::doApply()
bool const firstOccurance = mints.find(id) == mints.end();
if (dropsAdded + toCredit < dropsAdded)
{
JLOG(ctx_.journal.warn()) << "GenesisMint: cannot credit " << id
<< " due to dropsAdded overflow";
return tecINTERNAL;
}
dropsAdded += toCredit;
// if flags / marks appear more than once we just take the first