Compare commits

..

1 Commits

Author SHA1 Message Date
OrbisAI Security
da660a2c02
Merge 7c141eca1822ac0c4cfb372a7b084df70790c804 into 5f4f9643258dc2a65e684b63f12c8d543c936c67 2026-05-25 10:00:33 +05:30

View File

@ -108,11 +108,11 @@ func TestXMLBindingAdversarialInputs(t *testing.T) {
<root attr="&e3;">value</root>`, <root attr="&e3;">value</root>`,
}, },
{ {
name: "malformed_xml", name: "malformed_xml",
payload: `<?xml version="1.0"?><root><unclosed><also_unclosed>text`, payload: `<?xml version="1.0"?><root><unclosed><also_unclosed>text`,
}, },
{ {
name: "null_bytes", name: "null_bytes",
payload: "<?xml version=\"1.0\"?><root>\x00\x00\x00</root>", payload: "<?xml version=\"1.0\"?><root>\x00\x00\x00</root>",
}, },
{ {
@ -140,6 +140,7 @@ func TestXMLBindingAdversarialInputs(t *testing.T) {
xmlBind := xmlBinding{} xmlBind := xmlBinding{}
for _, tc := range payloads { for _, tc := range payloads {
tc := tc
t.Run(tc.name, func(t *testing.T) { t.Run(tc.name, func(t *testing.T) {
// Measure baseline memory // Measure baseline memory
var memBefore runtime.MemStats var memBefore runtime.MemStats
@ -193,4 +194,4 @@ func TestXMLBindingAdversarialInputs(t *testing.T) {
} }
}) })
} }
} }