mirror of
https://github.com/go-i2p/go-i2p.git
synced 2025-07-04 05:26:51 -04:00
fuzzing with dvyukov/go-fuzz
This commit is contained in:
@ -0,0 +1 @@
|
||||
|
@ -0,0 +1 @@
|
||||
|
BIN
lib/common/fuzz/string/corpus/test-input-1
Normal file
BIN
lib/common/fuzz/string/corpus/test-input-1
Normal file
Binary file not shown.
BIN
lib/common/fuzz/string/corpus/test-input-128
Normal file
BIN
lib/common/fuzz/string/corpus/test-input-128
Normal file
Binary file not shown.
BIN
lib/common/fuzz/string/corpus/test-input-2
Normal file
BIN
lib/common/fuzz/string/corpus/test-input-2
Normal file
Binary file not shown.
BIN
lib/common/fuzz/string/corpus/test-input-3
Normal file
BIN
lib/common/fuzz/string/corpus/test-input-3
Normal file
Binary file not shown.
1
lib/common/fuzz/string/corpus/test-input-4
Normal file
1
lib/common/fuzz/string/corpus/test-input-4
Normal file
@ -0,0 +1 @@
|
||||
|
1
lib/common/fuzz/string/corpus/test-input-5
Normal file
1
lib/common/fuzz/string/corpus/test-input-5
Normal file
@ -0,0 +1 @@
|
||||
|
1
lib/common/fuzz/string/corpus/test-input-6
Normal file
1
lib/common/fuzz/string/corpus/test-input-6
Normal file
@ -0,0 +1 @@
|
||||
|
13
lib/common/fuzz/string/fuzz.go
Normal file
13
lib/common/fuzz/string/fuzz.go
Normal file
@ -0,0 +1,13 @@
|
||||
package exportable
|
||||
|
||||
import "github.com/hkparker/go-i2p/lib/common"
|
||||
|
||||
func Fuzz(data []byte) int {
|
||||
str, _, _ := common.ReadString(data)
|
||||
str.Data()
|
||||
str.Length()
|
||||
str, _ = common.ToI2PString(string(data))
|
||||
str.Data()
|
||||
str.Length()
|
||||
return 0
|
||||
}
|
Reference in New Issue
Block a user