blob: 395cf36c7f8c79c5507293ef163f508f7ac339e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
// Regression test ensuring that that a STORED entry with differing compressed
// and uncompressed sizes is considered to be corrupt.
add_task(async function test1801102() {
let file = do_get_file("data/test_1801102.jar");
let zipreader = Cc["@mozilla.org/libjar/zip-reader;1"].createInstance(
Ci.nsIZipReader
);
zipreader.open(file);
Assert.throws(
() => zipreader.test(""),
/NS_ERROR_FILE_CORRUPTED/,
"must throw"
);
});
|