json-repair
json-repair copied to clipboard
A stack overflow occurs on certain input data.
Describe the bug
I don't know if it is possible to use it like that, but...
Steps to reproduce
jsonrepair.RepairJSON(`
{
"Be": "",
"gone": ""
}
",п"г`)
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc0201e0358 stack=[0xc0201e0000, 0xc0401e0000]
fatal error: stack overflow
Expected behavior
Return a string
{
"Be": "",
"gone": ""
}
Environment
- OS: OS: Ubuntu 24.04 LTS
- go version go1.23.2 linux/amd64
A year later and this stack overflow bug still crashes my app.....