blob: 2a2cd76b1780e5edfe37089609d6b9052b39dbf0 [file] [log] [blame]
// +build gofuzz
package sftp
import "bytes"
type sink struct{}
func (*sink) Close() error { return nil }
func (*sink) Write(p []byte) (int, error) { return len(p), nil }
var devnull = &sink{}
// To run: go-fuzz-build && go-fuzz
func Fuzz(data []byte) int {
c, err := NewClientPipe(bytes.NewReader(data), devnull)
if err != nil {
return 0
}
c.Close()
return 1
}