Use safeAdd to avoid overflow in the mempool isFull() condition check · Issue #2537 · cometbft/cometbft · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #2498 some logic was added to avoid overflows, but as mentioned in a comment on its backport to v1.x, the logic introduced does not really prevent overflows.
The right way of implementing this condition check would be using a safeAdd method for txSize+txsBytes
But it seems we don't have support for int64 methods in safemath
We have some logic in the validator_set for that that probably could be implemented in safemath to be used in different places.
The text was updated successfully, but these errors were encountered:
In #2498 some logic was added to avoid overflows, but as mentioned in a comment on its backport to v1.x, the logic introduced does not really prevent overflows.
The right way of implementing this condition check would be using a safeAdd method for
txSize+txsBytes
But it seems we don't have support for
int64
methods in safemathWe have some logic in the
validator_set
for that that probably could be implemented insafemath
to be used in different places.The text was updated successfully, but these errors were encountered: