Skip to content

Commit 11f17ca

Browse files
authored
Merge pull request #736 from tronprotocol/feature/add_verification_for_freezeAsset
add long overflow verification
2 parents 17559d1 + f0bef21 commit 11f17ca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/org/tron/core/actuator/AssetIssueActuator.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ public boolean validate() throws ContractValidateException {
163163

164164
while (iterator.hasNext()) {
165165
FrozenSupply next = iterator.next();
166+
if (next.getFrozenAmount() <= 0) {
167+
throw new ContractValidateException("Frozen supply must be greater than 0!");
168+
}
166169
if (next.getFrozenAmount() > remainSupply) {
167170
throw new ContractValidateException("Frozen supply cannot exceed total supply");
168171
}

0 commit comments

Comments
 (0)