json-repair icon indicating copy to clipboard operation
json-repair copied to clipboard

A stack overflow occurs on certain input data.

Open pirST opened this issue 1 year ago • 1 comments

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

pirST avatar Dec 30 '24 22:12 pirST

A year later and this stack overflow bug still crashes my app.....

WEIFENG2333 avatar Nov 21 '25 08:11 WEIFENG2333