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]
|
#[test]
|
||||||
fn zip64_magic_in_filenames() {
|
fn zip64_magic_in_filenames() {
|
||||||
let files = vec![
|
let files = vec![
|
||||||
include_bytes!("../tests/data/zip64_magic_in_filename_1.zip"),
|
include_bytes!("../tests/data/zip64_magic_in_filename_1.zip").to_vec(),
|
||||||
include_bytes!("../tests/data/zip64_magic_in_filename_2.zip"),
|
include_bytes!("../tests/data/zip64_magic_in_filename_2.zip").to_vec(),
|
||||||
include_bytes!("../tests/data/zip64_magic_in_filename_3.zip"),
|
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
|
// 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.
|
// CDB-end-locator signatures, we still read them when they aren't genuinely ambiguous.
|
||||||
for file in files {
|
for file in files {
|
||||||
let mut v = Vec::new();
|
ZipArchive::new(Cursor::new(file)).unwrap();
|
||||||
v.extend_from_slice(file);
|
|
||||||
ZipArchive::new(Cursor::new(v)).unwrap();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue