File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
1515## Changed
1616- ` AbiFunction ` and ` AbiBytes ` parser is now more strict
17+ - We now check length of AbiArrayDynamic and don't crash in case it's too large
1718- SMT queries now run in separate processes, which allows us to better manage
1819 timeouts and memory usage by the SMT solver.
1920- We now allow limiting the SMT solver's memory usage via ` --smt-memory ` (in MB).
Original file line number Diff line number Diff line change @@ -257,7 +257,9 @@ getAbi t = label (Text.unpack (abiTypeSolidity t)) $
257257
258258 AbiArrayDynamicType t' -> do
259259 AbiUInt _ n <- label " array length" (getAbi (AbiUIntType 256 ))
260- AbiArrayDynamic t' <$>
260+ let maxLen = fromIntegral (maxBound :: Int ) :: Word256
261+ if n > maxLen then fail " array length exceeds maximum Int"
262+ else AbiArrayDynamic t' <$>
261263 label " array body" (getAbiSeq (unsafeInto n) (repeat t'))
262264
263265 AbiTupleType ts ->
You can’t perform that action at this time.
0 commit comments