From a5277cd5d71cab994fc29b2d626aba3ab19e7b17 Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Tue, 25 Jun 2024 20:51:04 -0500 Subject: [PATCH] use first match --- fuzzing/corpus/corpus.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuzzing/corpus/corpus.go b/fuzzing/corpus/corpus.go index 8918b945..b2d49f16 100644 --- a/fuzzing/corpus/corpus.go +++ b/fuzzing/corpus/corpus.go @@ -225,7 +225,7 @@ func (c *Corpus) initializeSequences(sequenceFiles *corpusDirectory[calls.CallSe // If the filename is a timestamp as expected, use it as a weight for the mutation chooser. re := regexp.MustCompile("[0-9]+") var weight *big.Int - if filename := re.FindAllString(sequenceFileData.fileName, 0); filename != nil { + if filename := re.FindAllString(sequenceFileData.fileName, 1); filename != nil { if timestamp, err := strconv.ParseUint(filename[0], 10, 64); err != nil { weight = new(big.Int).SetUint64(timestamp) }