File: fuzz.go

package info (click to toggle)
golang-github-dhowett-go-plist 0.0~git20160708.0.fec78c8-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 280 kB
  • ctags: 251
  • sloc: makefile: 2
file content (17 lines) | stat: -rw-r--r-- 215 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// +build gofuzz

package plist

import (
	"bytes"
)

func Fuzz(data []byte) int {
	buf := bytes.NewReader(data)

	var obj interface{}
	if err := NewDecoder(buf).Decode(&obj); err != nil {
		return 0
	}
	return 1
}