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

Issue 5787062: code review 5787062: archive/zip: write data descriptor signature for OS X; ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by bradfitz
Modified:
12 years, 2 months ago
Reviewers:
adg1
CC:
golang-dev, brainman, nigeltao, rsc
Visibility:
Public.

Description

archive/zip: write data descriptor signature for OS X; fix bugs reading it We now always write the "optional" streaming data descriptor signature, which turns out to be required for OS X. Also, handle reading the data descriptor with or without the signature, per the spec's recommendation. Fix data descriptor reading bugs found in the process. Fixes issue 3252

Patch Set 1 #

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

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

Total comments: 1

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

Total comments: 6

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -57 lines) Patch
M src/pkg/archive/zip/reader.go View 1 2 3 4 5 4 chunks +44 lines, -16 lines 0 comments Download
M src/pkg/archive/zip/reader_test.go View 1 11 chunks +95 lines, -36 lines 0 comments Download
M src/pkg/archive/zip/struct.go View 1 1 chunk +5 lines, -4 lines 0 comments Download
A src/pkg/archive/zip/testdata/go-no-datadesc-sig.zip View 1 Binary file 0 comments Download
A src/pkg/archive/zip/testdata/go-with-datadesc-sig.zip View 1 Binary file 0 comments Download
M src/pkg/archive/zip/writer.go View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/archive/zip/writer_test.go View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9
bradfitz
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 2 months ago (2012-03-09 04:29:23 UTC) #1
brainman
Still works on windows. Alex
12 years, 2 months ago (2012-03-09 04:46:03 UTC) #2
nigeltao
I don't know the zip code or format well enough, but a drive-by comment... http://codereview.appspot.com/5787062/diff/4001/src/pkg/archive/zip/reader_test.go ...
12 years, 2 months ago (2012-03-09 12:16:40 UTC) #3
bradfitz
On Fri, Mar 9, 2012 at 4:16 AM, <nigeltao@golang.org> wrote: > I don't know the ...
12 years, 2 months ago (2012-03-09 16:34:23 UTC) #4
rsc
LGTM I can't believe they broke this. http://codereview.appspot.com/5787062/diff/8001/src/pkg/archive/zip/reader.go File src/pkg/archive/zip/reader.go (right): http://codereview.appspot.com/5787062/diff/8001/src/pkg/archive/zip/reader.go#newcode153 src/pkg/archive/zip/reader.go:153: n, err ...
12 years, 2 months ago (2012-03-09 21:53:15 UTC) #5
bradfitz
Hello golang-dev@googlegroups.com, alex.brainman@gmail.com, nigeltao@golang.org, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 2 months ago (2012-03-09 22:03:36 UTC) #6
bradfitz
http://codereview.appspot.com/5787062/diff/8001/src/pkg/archive/zip/reader.go File src/pkg/archive/zip/reader.go (right): http://codereview.appspot.com/5787062/diff/8001/src/pkg/archive/zip/reader.go#newcode153 src/pkg/archive/zip/reader.go:153: n, err = r.rc.Read(b) On 2012/03/09 21:53:15, rsc wrote: ...
12 years, 2 months ago (2012-03-09 22:03:37 UTC) #7
bradfitz
*** Submitted as http://code.google.com/p/go/source/detail?r=0a07d08fb35b *** archive/zip: write data descriptor signature for OS X; fix bugs ...
12 years, 2 months ago (2012-03-09 22:12:04 UTC) #8
adg1
12 years, 2 months ago (2012-03-12 01:18:41 UTC) #9
Thanks for tracking this down, Brad. What a crazy world the zip format is...

On Saturday, 10 March 2012, wrote:

> *** Submitted as
>
http://code.google.com/p/go/**source/detail?r=0a07d08fb35b<http://code.google...
>
> archive/zip: write data descriptor signature for OS X; fix bugs reading
> it
>
> We now always write the "optional" streaming data descriptor
> signature, which turns out to be required for OS X.
>
> Also, handle reading the data descriptor with or without the
> signature, per the spec's recommendation. Fix data descriptor
> reading bugs found in the process.
>
> Fixes issue 3252
>
> R=golang-dev, alex.brainman, nigeltao, rsc
> CC=golang-dev
> http://codereview.appspot.com/**5787062<http://codereview.appspot.com/5787062>
>
>
>
http://codereview.appspot.com/**5787062/<http://codereview.appspot.com/5787062/>
>
Sign in to reply to this message.

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