Skip to content

Commit d8d5991

Browse files
committed
add length check
1 parent 3f37066 commit d8d5991

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/main/java/org/tron/common/runtime/vm/PrecompiledContracts.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,7 @@ private Pair<Boolean, byte[]> doExecute(byte[] data)
13611361
byte[][] signatures = extractBytesArray(words, words[1].intValueSafe() / DataWord.WORD_SIZE, data);
13621362
byte[][] addresses = extractBytes32Array(words, words[2].intValueSafe() / DataWord.WORD_SIZE);
13631363
int cnt = signatures.length;
1364-
if (signatures.length != addresses.length) {
1364+
if (cnt == 0 || signatures.length != addresses.length) {
13651365
return Pair.of(true, new DataWord(Longs.toByteArray(0)).getData());
13661366
}
13671367
// add check

0 commit comments

Comments
 (0)