aboutsummaryrefslogtreecommitdiff
path: root/src/archive/tar/format.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/archive/tar/format.go')
-rw-r--r--src/archive/tar/format.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/archive/tar/format.go b/src/archive/tar/format.go
index 21b9d9d4db..8898c438b5 100644
--- a/src/archive/tar/format.go
+++ b/src/archive/tar/format.go
@@ -143,6 +143,10 @@ const (
blockSize = 512 // Size of each block in a tar stream
nameSize = 100 // Max length of the name field in USTAR format
prefixSize = 155 // Max length of the prefix field in USTAR format
+
+ // Max length of a special file (PAX header, GNU long name or link).
+ // This matches the limit used by libarchive.
+ maxSpecialFileSize = 1 << 20
)
// blockPadding computes the number of bytes needed to pad offset up to the