]> Cypherpunks repositories - gostls13.git/commit
archive/tar: fix a case where USTAR-split is not working correctly.
authorMarco Hennings <marco.hennings@freiheit.com>
Fri, 6 Sep 2013 20:49:38 +0000 (16:49 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 6 Sep 2013 20:49:38 +0000 (16:49 -0400)
commit4e998d71c9abf1a2d302307301688108ccfffc56
tree8a2aed17494a9f5cb645a833c18cc14d6faab410
parentfb25a61872f3679cd2c4880e93cc2a44a9d373f7
archive/tar: fix a case where USTAR-split is not working correctly.

For some long filenames the USTAR-split code does not work
correctly. It is wrongly assumed that the path would not be too long,
but it is.

The user visible result was that a filename was split, but it still
caused an error.

The cause was a wrongly calculated nlen. In addition I noticed that
at this place it is also seems necessary to check if the prefix will
fit in the 155 chars available for the prefix.

R=dsymonds, rsc
CC=golang-dev
https://golang.org/cl/13300046
src/pkg/archive/tar/writer.go
src/pkg/archive/tar/writer_test.go