Skip to content

Commit

Permalink
fix two outdated comments (crytic#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
konnov authored Apr 10, 2024
1 parent 350d505 commit 1e843e1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fuzzing/fuzzer_worker_sequence_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package fuzzing

import (
"fmt"
"math/big"

"github.com/crytic/medusa/fuzzing/calls"
"github.com/crytic/medusa/fuzzing/valuegeneration"
"github.com/crytic/medusa/utils"
"github.com/crytic/medusa/utils/randomutils"
"math/big"
)

// CallSequenceGenerator generates call sequences iteratively per element, for use in fuzzing campaigns. It is attached
Expand Down Expand Up @@ -336,10 +337,10 @@ func callSeqGenFuncCorpusHead(sequenceGenerator *CallSequenceGenerator, sequence
// Obtain a call sequence from the corpus
corpusSequence, err := sequenceGenerator.worker.fuzzer.corpus.RandomMutationTargetSequence()
if err != nil {
return fmt.Errorf("could not obtain corpus call sequence for tail mutation: %v", err)
return fmt.Errorf("could not obtain corpus call sequence for head mutation: %v", err)
}

// Determine a random position to slice the call sequence.
// Determine the length of the slice to be copied in the head.
maxLength := utils.Min(len(sequence), len(corpusSequence))
copy(sequence, corpusSequence[:maxLength])

Expand Down

0 comments on commit 1e843e1

Please sign in to comment.