Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5873)

Issue 5975052: code review 5975052: encoding/base64: fix panic when input len is not a mult... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years ago by dfc
Modified:
12 years ago
Reviewers:
CC:
yg, dsymonds, sougou, minux1, rsc, golang-dev
Visibility:
Public.

Description

encoding/base64: fix panic when input len is not a multiple of 4 Fixes issue 3442.

Patch Set 1 #

Patch Set 2 : diff -r 8434de733c20 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 8434de733c20 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 8434de733c20 https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 8434de733c20 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 8434de733c20 https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 7 : diff -r 8434de733c20 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -0 lines) Patch
M src/pkg/encoding/base64/base64.go View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M src/pkg/encoding/base64/base64_test.go View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 20
dfc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
12 years ago (2012-03-31 10:07:43 UTC) #1
yg
Thanks On Mar 31, 2012 7:07 PM, <dave@cheney.net> wrote: > Reviewers: golang-dev_googlegroups.com, > > Message: ...
12 years ago (2012-03-31 10:25:42 UTC) #2
dsymonds
This seems odd. (1) why doesn't line 225 catch this? (2) trailing line breaks should ...
12 years ago (2012-03-31 11:30:25 UTC) #3
dfc
> This seems odd. I think it's an edge case that the tests did not ...
12 years ago (2012-03-31 13:07:04 UTC) #4
dsymonds
On Sun, Apr 1, 2012 at 12:07 AM, <dave@cheney.net> wrote: >> (2) trailing line breaks ...
12 years ago (2012-03-31 13:16:56 UTC) #5
dfc
Hello golang-dev@googlegroups.com, for.go.yong@gmail.com, dsymonds@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years ago (2012-03-31 13:19:48 UTC) #6
sougou
It seems like the code will not handle the case where there are line breaks ...
12 years ago (2012-03-31 16:58:39 UTC) #7
dsymonds
On Sun, Apr 1, 2012 at 2:58 AM, <sougou@google.com> wrote: > It seems like the ...
12 years ago (2012-03-31 22:56:02 UTC) #8
dfc
I can add some test cases for strings like QQ=\n, but if there are no ...
12 years ago (2012-03-31 23:01:29 UTC) #9
sougou
Sounds good. The patch works for me. On Sat, Mar 31, 2012 at 4:01 PM, ...
12 years ago (2012-04-01 05:42:12 UTC) #10
dfc
It turns out there are already tests for newline characters, these continue to pass with ...
12 years ago (2012-04-02 09:48:31 UTC) #11
dfc
Hello golang-dev@googlegroups.com, for.go.yong@gmail.com, dsymonds@golang.org, sougou@google.com (cc: golang-dev@googlegroups.com), Please take another look.
12 years ago (2012-04-02 09:49:20 UTC) #12
dsymonds
On Mon, Apr 2, 2012 at 7:48 PM, <dave@cheney.net> wrote: > It turns out there ...
12 years ago (2012-04-02 12:05:11 UTC) #13
dsymonds
LGTM If no-one raises objections or alternatives overnight, I'll submit this tomorrow.
12 years ago (2012-04-02 12:05:34 UTC) #14
minux1
http://codereview.appspot.com/5975052/diff/3004/src/pkg/encoding/base64/base64.go File src/pkg/encoding/base64/base64.go (right): http://codereview.appspot.com/5975052/diff/3004/src/pkg/encoding/base64/base64.go#newcode230 src/pkg/encoding/base64/base64.go:230: if in == '=' && j > 1 && ...
12 years ago (2012-04-02 12:18:23 UTC) #15
dfc
> http://codereview.appspot.com/5975052/diff/3004/src/pkg/encoding/base64/base64.go#newcode230 > src/pkg/encoding/base64/base64.go:230: if in == '=' && j > 1 && len(src) > ...
12 years ago (2012-04-02 12:28:33 UTC) #16
rsc
http://codereview.appspot.com/5975052/diff/3004/src/pkg/encoding/base64/base64.go File src/pkg/encoding/base64/base64.go (right): http://codereview.appspot.com/5975052/diff/3004/src/pkg/encoding/base64/base64.go#newcode230 src/pkg/encoding/base64/base64.go:230: if in == '=' && j > 1 && ...
12 years ago (2012-04-02 16:51:27 UTC) #17
dfc
Hello for.go.yong@gmail.com, dsymonds@golang.org, sougou@google.com, minux.ma@gmail.com, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years ago (2012-04-02 20:54:01 UTC) #18
dsymonds
LGTM
12 years ago (2012-04-03 02:08:05 UTC) #19
dsymonds
12 years ago (2012-04-03 02:14:10 UTC) #20
*** Submitted as http://code.google.com/p/go/source/detail?r=95e67cc5fa08 ***

encoding/base64: fix panic when input len is not a multiple of 4

Fixes issue 3442.

R=for.go.yong, dsymonds, sougou, minux.ma, rsc
CC=golang-dev
http://codereview.appspot.com/5975052

Committer: David Symonds <dsymonds@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b