Skip to content

Commit

Permalink
fix two outdated comments (#347)
Browse files Browse the repository at this point in the history
konnov authored and s4nsec committed Jul 8, 2024

Verified

This commit was signed with the committer’s verified signature.
sandhose Quentin Gliech
1 parent 42a16b0 commit e58ae6e
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
@@ -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
@@ -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])

0 comments on commit e58ae6e

Please sign in to comment.