Fuzzing: Add 4 fuzzers

Signed-off-by: AdamKorcz <adam@adalogics.com>
This commit is contained in:
AdamKorcz
2021-08-11 19:20:47 +01:00
parent 7d4c95ff04
commit 538d93d2fc
5 changed files with 112 additions and 6 deletions

View File

@@ -0,0 +1,27 @@
// +build gofuzz
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package fuzz
import (
"bytes"
"github.com/containerd/containerd/pkg/cap"
)
func FuzzParseProcPIDStatus(data []byte) int {
_, _ = cap.ParseProcPIDStatus(bytes.NewReader(data))
return 1
}