Merge cb0a76caf675620bb3268153128ca2adac317d9a into c3d5a28ed6d3849da820195b6774d212bcc038a9

This commit is contained in:
AdamKorcz 2025-11-08 10:01:35 +01:00 committed by GitHub
commit 1fba1b7a92
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
}