1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! An input that once panicked `resolve`, kept as an ordinary test.
//!
//! Unlike the other fuzz-found defects in this fleet, the panic was not ours:
//! it fired inside `sevenz-rust2` 0.21.3 (`reader.rs:1047`, "attempt to add
//! with overflow") while parsing a 7z header. That does not make it any less
//! our problem — a `*-core` crate must not panic on attacker-controlled input,
//! whichever crate's frame the panic happens to be in.
//!
//! Upstream fixed it in 0.21.4, and the requirement here (`"0.21"`) already
//! allowed that; only the lockfile was behind. So the fix is a lock refresh
//! rather than a workaround, and this test is what stops the lock drifting back
//! without anyone noticing.
//!
//! The assertion is deliberately weak on *what* comes back. A malformed archive
//! may legitimately resolve to nothing or fail; the contract under test is only
//! that it returns rather than panicking.
use ;
/// libFuzzer `fuzz_resolve` reproducer: overflowed an addition in the 7z header
/// reader.
const SEVENZ_CRASH: & =
include_bytes!;