mirror of
https://github.com/gin-gonic/gin.git
synced 2026-06-06 11:59:41 +08:00
Compare commits
2 Commits
da660a2c02
...
dacf0c896e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dacf0c896e | ||
|
|
4c93b80139 |
@ -108,11 +108,11 @@ func TestXMLBindingAdversarialInputs(t *testing.T) {
|
||||
<root attr="&e3;">value</root>`,
|
||||
},
|
||||
{
|
||||
name: "malformed_xml",
|
||||
name: "malformed_xml",
|
||||
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>",
|
||||
},
|
||||
{
|
||||
@ -140,7 +140,6 @@ func TestXMLBindingAdversarialInputs(t *testing.T) {
|
||||
xmlBind := xmlBinding{}
|
||||
|
||||
for _, tc := range payloads {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
// Measure baseline memory
|
||||
var memBefore runtime.MemStats
|
||||
@ -194,4 +193,4 @@ func TestXMLBindingAdversarialInputs(t *testing.T) {
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user