]> Cypherpunks repositories - gostls13.git/commit
encoding/base32: handle surplus padding consistently
authorGustav Westling <zegl@westling.xyz>
Wed, 9 May 2018 21:02:14 +0000 (21:02 +0000)
committerIan Lance Taylor <iant@golang.org>
Wed, 9 May 2018 22:09:56 +0000 (22:09 +0000)
commit0f2d4d00088486297d013fce6235ad0ac01f033e
tree01f3b1a631fbbc8a3f980b112a813469d4018b7d
parent3e297120fdf306507496e1dd650fd86ebb9aeb36
encoding/base32: handle surplus padding consistently

This changes decoder.Read to always return io.ErrUnexpectedEOF if the input
contains surplus padding or unexpected content. Previously the error could
be io.EOF or io.ErrUnexpectedEOF depending on how the input was chunked.

Fixes #25296

Change-Id: I07c36c35e6c83e795c3991bfe45647a35aa58aa4
GitHub-Last-Rev: 818dfda90b0edf9fc415da4579c5810268c1cdba
GitHub-Pull-Request: golang/go#25319
Reviewed-on: https://go-review.googlesource.com/112516
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/encoding/base32/base32.go
src/encoding/base32/base32_test.go