1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-21 18:11:09 +00:00

Make sure slice is not out of range when reading XML prolog

This commit is contained in:
Frédéric Guillot 2018-11-24 12:17:00 -08:00
parent 70be08eaf8
commit f3bff76aa1
3 changed files with 8 additions and 1 deletions

View file

@ -123,6 +123,7 @@ func TestEnsureUnicodeWithHTMLDocuments(t *testing.T) {
{"rdf_utf8.xml", "application/rss+xml; charset=utf-8", true},
{"charset-content-type-xml-iso88591.xml", "application/rss+xml; charset=ISO-8859-1", false},
{"windows_1251.xml", "text/xml", false},
{"smallfile.xml", "text/xml; charset=utf-8", true},
}
for _, tc := range unicodeTestCases {