Source file src/cmd/cgo/internal/testsanitizers/testdata/libfuzzer2.go

     1  package main
     2  
     3  import "C"
     4  
     5  import "unsafe"
     6  
     7  //export FuzzMe
     8  func FuzzMe(p unsafe.Pointer, sz C.int) {
     9  	b := C.GoBytes(p, sz)
    10  	b = b[3:]
    11  	if len(b) >= 4 && b[0] == 'f' && b[1] == 'u' && b[2] == 'z' && b[3] == 'z' {
    12  		panic("found it")
    13  	}
    14  }
    15  
    16  func main() {}
    17  

View as plain text