@ -12,6 +12,7 @@ import (
"code.gitea.io/gitea/modules/markup"
"code.gitea.io/gitea/modules/markup"
"code.gitea.io/gitea/modules/markup/markdown"
"code.gitea.io/gitea/modules/markup/markdown"
"code.gitea.io/gitea/modules/setting"
)
)
// Contains fuzzing functions executed by
// Contains fuzzing functions executed by
@ -32,6 +33,7 @@ var (
)
)
func FuzzMarkdownRenderRaw ( data [ ] byte ) int {
func FuzzMarkdownRenderRaw ( data [ ] byte ) int {
setting . AppURL = "http://localhost:3000/"
err := markdown . RenderRaw ( & renderContext , bytes . NewReader ( data ) , io . Discard )
err := markdown . RenderRaw ( & renderContext , bytes . NewReader ( data ) , io . Discard )
if err != nil {
if err != nil {
return 0
return 0
@ -40,6 +42,7 @@ func FuzzMarkdownRenderRaw(data []byte) int {
}
}
func FuzzMarkupPostProcess ( data [ ] byte ) int {
func FuzzMarkupPostProcess ( data [ ] byte ) int {
setting . AppURL = "http://localhost:3000/"
err := markup . PostProcess ( & renderContext , bytes . NewReader ( data ) , io . Discard )
err := markup . PostProcess ( & renderContext , bytes . NewReader ( data ) , io . Discard )
if err != nil {
if err != nil {
return 0
return 0