Merge cb0a76caf675620bb3268153128ca2adac317d9a into 8763f33c65f7df8be5b9fe7504ab7fcf20abb41d

This commit is contained in:
AdamKorcz 2025-03-23 08:37:49 +08:00 committed by GitHub
commit 8086c6cf17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

21
render/fuzz.go Normal file
View File

@ -0,0 +1,21 @@
// Copyright 2020 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
// +build gofuzz
package render
import (
"net/http/httptest"
)
func FuzzRender(data []byte) int {
w := httptest.NewRecorder()
(YAML{string(data)}).WriteContentType(w)
err := (YAML{string(data)}).Render(w)
if err != nil {
return 0
}
return 1
}