Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: runtime error: slice bounds out of range #190

Closed
wmzy opened this issue Oct 31, 2017 · 0 comments
Closed

panic: runtime error: slice bounds out of range #190

wmzy opened this issue Oct 31, 2017 · 0 comments

Comments

@wmzy
Copy link

wmzy commented Oct 31, 2017

The code below will panic:

jsoniter.Get([]byte(""))

Error:

	panic: runtime error: slice bounds out of range

/vendor/github.com/json-iterator/go.(*Iterator).stopCapture(0xc4201c0a80, 0xffffffffffffffff, 0xc42016f940, 0xa07c60)
	/vendor/github.com/json-iterator/go/feature_iter_skip.go:58 +0x270
/vendor/github.com/json-iterator/go.(*Iterator).readNumberAny(0xc4201c0a80, 0x1, 0x0, 0x0)
	/vendor/github.com/json-iterator/go/feature_any.go:168 +0x57
/vendor/github.com/json-iterator/go.(*Iterator).readAny(0xc4201c0a80, 0x7a4680, 0xc420139ce0)
	/vendor/github.com/json-iterator/go/feature_any.go:161 +0x108
/vendor/github.com/json-iterator/go.locatePath(0xc4201c0a80, 0x0, 0x0, 0x0, 0xc4201c0a80, 0x4d6900)
	/vendor/github.com/json-iterator/go/feature_any.go:241 +0x61b
/vendor/github.com/json-iterator/go.(*frozenConfig).Get(0xc420163d50, 0xa4ee88, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/vendor/github.com/json-iterator/go/feature_config.go:303 +0xc6
/vendor/github.com/json-iterator/go.Get(0xa4ee88, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe, 0xc4201bc780)
	/vendor/github.com/json-iterator/go/feature_adapter.go:35 +0x78
@taowen taowen closed this as completed in aed5a81 Oct 31, 2017
zhenzou pushed a commit to zhenzou/jsoniter that referenced this issue Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant