The JSON decoder without msgio enabled is broken. #24
Labels
help wanted
Seeking public contribution on this issue
kind/bug
A bug in existing code (including security flaws)
Stebalien commentedDec 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
The text was updated successfully, but these errors were encountered: