snapshot-labs / sx-starknet

Core smart contracts of Snapshot X for Starknet
https://docs.snapshotx.xyz
MIT License
118 stars 71 forks source link

audit: L-05 Infinite Loop #562

Closed Orland0x closed 1 year ago

Orland0x commented 1 year ago

The into_le_u64_array breaks the loop after processing the last element but does not break when the loop is empty. This means that if the input array is empty, the function enters an infinite loop. Consider raising an error in this case.