commit | a2770af447a470cf34841f09d0a5bf23a9b5ea9e | [log] [tgz] |
---|---|---|
author | Rui Ueyama <ruiu@google.com> | Thu Mar 20 16:00:34 2014 +1100 |
committer | Nigel Tao <nigeltao@golang.org> | Thu Mar 20 16:00:34 2014 +1100 |
tree | 2eec5480deb493375d7e5b5abf44866e4e70c105 | |
parent | 90a66fa6aff43214298bbb3e184b2eb8c2bd6850 [diff] |
base64: fix bug that decoder fails to detect corruption Encoding.Decode() failed to detect trailing garbages if input contains "==" followed by garbage smaller than 3 bytes (for example, it failed to detect "x" in "AA==x"). This patch fixes the bug and adds a few tests. LGTM=nigeltao R=golang-codereviews, bradfitz, nigeltao CC=golang-codereviews https://golang.org/cl/75340044