hashes map[[sha256.Size]byte]bool
}
-// addCorpusEntries adds entries to the corpus, and optional also writes the entries
+// addCorpusEntries adds entries to the corpus, and optionally writes the entries
// to the cache directory. If an entry is already in the corpus it is skipped. If
// all of the entries are unique, addCorpusEntries returns true and a nil error,
// if at least one of the entries was a duplicate, it returns false and a nil error.
func (c *coordinator) addCorpusEntries(addToCache bool, entries ...CorpusEntry) (bool, error) {
noDupes := true
for _, e := range entries {
- data, err := CorpusEntryData(e)
+ data, err := corpusEntryData(e)
if err != nil {
return false, err
}
IsSeed bool
}
-// Data returns the raw input bytes, either from the data struct field,
-// or from disk.
-func CorpusEntryData(ce CorpusEntry) ([]byte, error) {
+// corpusEntryData returns the raw input bytes, either from the data struct
+// field, or from disk.
+func corpusEntryData(ce CorpusEntry) ([]byte, error) {
if ce.Data != nil {
return ce.Data, nil
}
return CorpusEntry{}, minimizeResponse{}, errSharedMemClosed
}
mem.header().count = 0
- inp, err := CorpusEntryData(entryIn)
+ inp, err := corpusEntryData(entryIn)
if err != nil {
return CorpusEntry{}, minimizeResponse{}, err
}
return CorpusEntry{}, fuzzResponse{}, true, errSharedMemClosed
}
mem.header().count = 0
- inp, err := CorpusEntryData(entryIn)
+ inp, err := corpusEntryData(entryIn)
if err != nil {
return CorpusEntry{}, fuzzResponse{}, true, err
}