Bug fix
This commit is contained in:
parent
fba2b971ae
commit
332d09f51a
1 changed files with 4 additions and 6 deletions
10
src/read.rs
10
src/read.rs
|
@ -1244,16 +1244,14 @@ mod test {
|
|||
#[test]
|
||||
fn zip64_magic_in_filenames() {
|
||||
let files = vec![
|
||||
include_bytes!("../tests/data/zip64_magic_in_filename_1.zip"),
|
||||
include_bytes!("../tests/data/zip64_magic_in_filename_2.zip"),
|
||||
include_bytes!("../tests/data/zip64_magic_in_filename_3.zip"),
|
||||
include_bytes!("../tests/data/zip64_magic_in_filename_1.zip").to_vec(),
|
||||
include_bytes!("../tests/data/zip64_magic_in_filename_2.zip").to_vec(),
|
||||
include_bytes!("../tests/data/zip64_magic_in_filename_3.zip").to_vec()
|
||||
];
|
||||
// Although we don't allow adding files whose names contain the ZIP64 CDB-end or
|
||||
// CDB-end-locator signatures, we still read them when they aren't genuinely ambiguous.
|
||||
for file in files {
|
||||
let mut v = Vec::new();
|
||||
v.extend_from_slice(file);
|
||||
ZipArchive::new(Cursor::new(v)).unwrap();
|
||||
ZipArchive::new(Cursor::new(file)).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue