Merge cb0a76caf675620bb3268153128ca2adac317d9a into 077a2f39c85700ba0823f85ed29cec0c8f2cbdfc

This commit is contained in:
AdamKorcz 2025-08-20 02:15:45 +08:00 committed by GitHub
commit 0627a5f965
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
}