github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/pkg/kconfig/fuzz.go (about)

     1  // Copyright 2020 syzkaller project authors. All rights reserved.
     2  // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  package kconfig
     5  
     6  import (
     7  	"github.com/google/syzkaller/sys/targets"
     8  )
     9  
    10  func FuzzParseKConfig(data []byte) int {
    11  	ParseData(targets.Get("linux", "amd64"), data, "kconfig")
    12  	return 0
    13  }
    14  
    15  func FuzzParseConfig(data []byte) int {
    16  	ParseConfigData(data, "config")
    17  	return 0
    18  }
    19  
    20  func FuzzParseExpr(data []byte) int {
    21  	p := newParser(data, "expr")
    22  	if !p.nextLine() {
    23  		return 0
    24  	}
    25  	p.parseExpr()
    26  	return 0
    27  }