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

Issue 117550044: code review 117550044: archive/zip: accept bogus trailing zeros in extras (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 8 months ago by bradfitz
Modified:
9 years, 8 months ago
Reviewers:
ruiu, adg, dfc
CC:
adg, ruiu, dfc, frohrweck_google.com, golang-codereviews
Visibility:
Public.

Description

archive/zip: accept bogus trailing zeros in extras Popular tools both add incorrect trailing zeroes to the zip extras, and popular tools accept trailing zeros. We seemed to be the only ones being strict here. Stop being strict. :( Fixes Issue 8186

Patch Set 1 #

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

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

Total comments: 1

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

Total comments: 1

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -2 lines) Patch
M src/pkg/archive/zip/reader.go View 1 chunk +7 lines, -2 lines 0 comments Download
M src/pkg/archive/zip/reader_test.go View 2 chunks +23 lines, -0 lines 0 comments Download

Messages

Total messages: 10
bradfitz
Hello adg@golang.org (cc: frohrweck@google.com, golang-codereviews@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
9 years, 8 months ago (2014-08-04 18:44:23 UTC) #1
ruiu
https://codereview.appspot.com/117550044/diff/40001/src/pkg/archive/zip/reader.go File src/pkg/archive/zip/reader.go (right): https://codereview.appspot.com/117550044/diff/40001/src/pkg/archive/zip/reader.go#newcode273 src/pkg/archive/zip/reader.go:273: if len(b) != 0 { I think you can ...
9 years, 8 months ago (2014-08-04 18:51:24 UTC) #2
bradfitz
Done. On Mon, Aug 4, 2014 at 11:51 AM, <ruiu@google.com> wrote: > > https://codereview.appspot.com/117550044/diff/40001/src/ > ...
9 years, 8 months ago (2014-08-04 20:33:02 UTC) #3
bradfitz
Hello adg@golang.org, ruiu@google.com (cc: frohrweck@google.com, golang-codereviews@googlegroups.com), Please take another look.
9 years, 8 months ago (2014-08-04 20:33:03 UTC) #4
ruiu
LGTM https://codereview.appspot.com/117550044/diff/60001/src/pkg/archive/zip/reader_test.go File src/pkg/archive/zip/reader_test.go (right): https://codereview.appspot.com/117550044/diff/60001/src/pkg/archive/zip/reader_test.go#newcode533 src/pkg/archive/zip/reader_test.go:533: } I'd probably add a test to verify ...
9 years, 8 months ago (2014-08-04 20:37:38 UTC) #5
adg
LGTM Sigh. On Tuesday, 5 August 2014, <ruiu@google.com> wrote: > LGTM > > > https://codereview.appspot.com/117550044/diff/60001/src/ ...
9 years, 8 months ago (2014-08-04 22:16:22 UTC) #6
dfc
LGTM. I agree, why have a standard if the actual implementation is determined by mob ...
9 years, 8 months ago (2014-08-04 22:21:42 UTC) #7
bradfitz
Yes, in practice it's 0-3 bytes of extra zeros. On Mon, Aug 4, 2014 at ...
9 years, 8 months ago (2014-08-04 22:22:22 UTC) #8
adg
On 5 August 2014 08:21, Dave Cheney <dave@cheney.net> wrote: > why have a standard if ...
9 years, 8 months ago (2014-08-04 22:35:10 UTC) #9
bradfitz
9 years, 8 months ago (2014-08-04 23:12:59 UTC) #10
*** Submitted as https://code.google.com/p/go/source/detail?r=8ab50c14cd95 ***

archive/zip: accept bogus trailing zeros in extras

Popular tools both add incorrect trailing zeroes to the zip
extras, and popular tools accept trailing zeros. We seemed to
be the only ones being strict here. Stop being strict. :(

Fixes Issue 8186

LGTM=ruiu, adg, dave
R=adg, ruiu, dave
CC=frohrweck, golang-codereviews
https://codereview.appspot.com/117550044
Sign in to reply to this message.

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