Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

archive/tar: Writer allows writing data for a header-only file #15565

Closed
dsnet opened this issue May 6, 2016 · 1 comment
Closed

archive/tar: Writer allows writing data for a header-only file #15565

dsnet opened this issue May 6, 2016 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@dsnet
Copy link
Member

dsnet commented May 6, 2016

Using go1.6

For certain special file types like symlinks and friends, the tar file should contain no data. The Reader correctly avoids reading data, but the Writer allows (and expects) the user to write data for these header-only file types. Instead, we should return ErrWriteTooLong if the user tries to write data.

Example: https://play.golang.org/p/4au8V3Ynwj

@dsnet dsnet changed the title archive/tar: Writer allows writing after archive/tar: Writer allows writing data for a header-only file May 6, 2016
@dsnet dsnet self-assigned this May 9, 2016
@dsnet dsnet added this to the Unplanned milestone May 9, 2016
@dsnet dsnet modified the milestones: Go1.8, Unplanned Jun 28, 2016
@rsc rsc added the NeedsFix The path to resolution is known, but the work has not been done. label Sep 29, 2016
@rsc rsc modified the milestones: Go1.8Early, Go1.8 Sep 29, 2016
@quentinmit quentinmit modified the milestones: Go1.8Maybe, Go1.8Early Sep 29, 2016
@dsnet dsnet modified the milestones: Go1.9, Go1.8Maybe Oct 14, 2016
@dsnet dsnet modified the milestones: Go1.10, Go1.9 May 22, 2017
@gopherbot
Copy link

Change https://golang.org/cl/55553 mentions this issue: archive/tar: properly handle header-only "files" in Writer

@golang golang locked and limited conversation to collaborators Aug 15, 2018
@rsc rsc unassigned dsnet Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants