]> source.dussan.org Git - gitea.git/commit
Remove NULs byte arrays passed to PostProcess (#14587)
authorzeripath <art27@cantab.net>
Thu, 18 Feb 2021 01:32:14 +0000 (01:32 +0000)
committerGitHub <noreply@github.com>
Thu, 18 Feb 2021 01:32:14 +0000 (02:32 +0100)
commit7ab6c77b4120d96b3239f827da8b858f65c36863
tree658af939da8845e75f422471bbbc2dd36455f4b3
parentec06eb112c92d4c49248e69648df6f13e10dff18
Remove NULs byte arrays passed to PostProcess (#14587)

PostProcess is supposed to be parsing and handling HTML
fragments, but on fuzzing it appears that there is a weird
issue with NUL elements that could cause a memory address
error in downstream libraries.

The simplest solution is to strip out the weird NULs - they
should not be there in any case and would be stripped out
anyway.

Signed-off-by: Andrew Thornton <art27@cantab.net>
modules/markup/html.go