summaryrefslogtreecommitdiffstats
path: root/src/archive/zip/reader_test.go
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-08 04:09:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-08 04:09:35 +0000
commit14eb78c08c384545949758f2c00d8d44f06309a4 (patch)
treea33eb094d8630008a906374b2b30b627f237820b /src/archive/zip/reader_test.go
parentReleasing progress-linux version 1.21.10-1~progress7.99u1. (diff)
downloadgolang-1.21-14eb78c08c384545949758f2c00d8d44f06309a4.tar.xz
golang-1.21-14eb78c08c384545949758f2c00d8d44f06309a4.zip
Merging upstream version 1.21.11.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/archive/zip/reader_test.go')
-rw-r--r--src/archive/zip/reader_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/archive/zip/reader_test.go b/src/archive/zip/reader_test.go
index a67c335..d892595 100644
--- a/src/archive/zip/reader_test.go
+++ b/src/archive/zip/reader_test.go
@@ -570,6 +570,14 @@ var tests = []ZipTest{
},
},
},
+ // Issue 66869: Don't skip over an EOCDR with a truncated comment.
+ // The test file sneakily hides a second EOCDR before the first one;
+ // previously we would extract one file ("file") from this archive,
+ // while most other tools would reject the file or extract a different one ("FILE").
+ {
+ Name: "comment-truncated.zip",
+ Error: ErrFormat,
+ },
}
func TestReader(t *testing.T) {