diff --git a/src/archive/tar/reader.go b/src/archive/tar/reader.go index 0811779adda..8483fb52a28 100644 --- a/src/archive/tar/reader.go +++ b/src/archive/tar/reader.go @@ -811,9 +811,7 @@ func (sr sparseFileReader) physicalRemaining() int64 { type zeroReader struct{} func (zeroReader) Read(b []byte) (int, error) { - for i := range b { - b[i] = 0 - } + clear(b) return len(b), nil }