Skip to content

Commit

Permalink
fix panic
Browse files Browse the repository at this point in the history
  • Loading branch information
0xalpharush committed Dec 13, 2023
1 parent b974732 commit 95b9c6d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions fuzzing/fuzzer_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,10 @@ func (fw *FuzzerWorker) testShrunkenCallSequence(possibleShrunkSequence calls.Ca
func (fw *FuzzerWorker) shrinkParam(callSequence *calls.CallSequence) {
i := fw.randomProvider.Intn(len(*callSequence))
abiValuesMsgData := (*callSequence)[i].Call.DataAbiValues
j := fw.randomProvider.Intn(len(abiValuesMsgData.InputValues))
// for j := 0; j < len(abiValuesMsgData.InputValues); j++ {
mutatedInput, _ := valuegeneration.MutateAbiValue(fw.sequenceGenerator.config.ValueGenerator, fw.shrinkingValueMutator, &abiValuesMsgData.Method.Inputs[j].Type, abiValuesMsgData.InputValues[j])
(*abiValuesMsgData).InputValues[j] = mutatedInput
// }
(*callSequence)[i].Call.DataAbiValues = abiValuesMsgData
for j := 0; j < len(abiValuesMsgData.InputValues); j++ {
mutatedInput, _ := valuegeneration.MutateAbiValue(fw.sequenceGenerator.config.ValueGenerator, fw.shrinkingValueMutator, &abiValuesMsgData.Method.Inputs[j].Type, abiValuesMsgData.InputValues[j])
abiValuesMsgData.InputValues[j] = mutatedInput
}
}

func (fw *FuzzerWorker) shorten(callSequence *calls.CallSequence) {
Expand Down

0 comments on commit 95b9c6d

Please sign in to comment.