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

The JSON decoder without msgio enabled is broken. #24

Closed
Stebalien opened this issue Dec 1, 2017 · 0 comments
Closed

The JSON decoder without msgio enabled is broken. #24

Stebalien opened this issue Dec 1, 2017 · 0 comments
Assignees
Labels
help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws)

Comments

@Stebalien
Copy link
Member

Stebalien commented Dec 1, 2017

When we construct a JSON stream decoder, without a limited reader, will read extra bytes off the stream (which we'll drop). The simple workaround is to always enable msgio however, that shouldn't be necessary. It's possible to get a buffered reader back out of json.Decoder.

Reported here: libp2p/go-libp2p#250
Example here: https://github.com/ericxtang/go-libp2p/blob/master/examples/race/race.go

@Stebalien Stebalien added kind/bug A bug in existing code (including security flaws) help wanted Seeking public contribution on this issue labels Dec 1, 2017
@kevina kevina self-assigned this Dec 1, 2017
@Stebalien Stebalien mentioned this issue Jan 5, 2019
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

2 participants