mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-27 22:15:49 +00:00
add overflow check to dropsAdded accumulator
This commit is contained in:
@@ -302,6 +302,13 @@ GenesisMint::doApply()
|
|||||||
|
|
||||||
bool const firstOccurance = mints.find(id) == mints.end();
|
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;
|
dropsAdded += toCredit;
|
||||||
|
|
||||||
// if flags / marks appear more than once we just take the first
|
// if flags / marks appear more than once we just take the first
|
||||||
|
|||||||
Reference in New Issue
Block a user