]> Cypherpunks repositories - gostls13.git/commit
archive/tar: Do not panic on Read if uninitialized
authorGuillaume J. Charmes <guillaume@charmes.net>
Thu, 15 May 2014 22:18:05 +0000 (15:18 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 15 May 2014 22:18:05 +0000 (15:18 -0700)
commit6d63d4f3be32bfd3dbc57fe6872d315369c59c6d
treedb16aed1e03654f4633d08f1112a53d5f600c390
parent8c8c260d2eecae480f99fcc336ab0e6fc15b23c4
archive/tar: Do not panic on Read if uninitialized

Calling tar.Reader.Read() used to work fine, but without this patch it panics.
Simply return EOF to indicate the tar.Reader.Next() needs to be called.

LGTM=iant, bradfitz
R=golang-codereviews, bradfitz, iant, mikioh.mikioh, dominik.honnef
CC=golang-codereviews
https://golang.org/cl/94530043
src/pkg/archive/tar/reader.go
src/pkg/archive/tar/reader_test.go