encoding/base32: decoder output depends on chunking of underlying reader #38657
Labels
FrozenDueToAge
help wanted
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
#31626 is about a problem that affects encoding/base64. A similar problem affects encoding/base32.
A decoder created by NewDecoder is sensitive to how its input is split into pieces, and it should not be. Whether the Decoder interprets the input as valid may depend on whether the underlying Reader yields one big byte slice, or two smaller byte slices, for example.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, with go1.14.2 on play.golang.org.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/KV4XPizhYj9
You can also try this input to see inconsistent error offsets (goes from index 4, to 0, back to 4):
What did you expect to see?
The decoder's output should be consistent, regardless of the chunking of the underlying reader.
What did you see instead?
The text was updated successfully, but these errors were encountered: