Skip to content

Commit 18aa011

Browse files
authored
Fix the copy length based panic in the parseBytes32 cheatcode (crytic#293)
1 parent 8832cfd commit 18aa011

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chain/standard_cheat_code_contract.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ func getStandardCheatCodeContract(tracer *cheatCodeTracer) (*CheatCodeContract,
452452

453453
// Use a fixed array and copy the data over
454454
var bArray [32]byte
455-
copy(bArray[:], bSlice[:32])
455+
copy(bArray[:], bSlice)
456456

457457
return []any{bArray}, nil
458458
},

0 commit comments

Comments
 (0)