Test case found by clusterfuzz to allocate excessive memory.
()
| 2397 | |
| 2398 | // Test case found by clusterfuzz to allocate excessive memory. |
| 2399 | fn test_huge_header() -> Vec<u8> { |
| 2400 | vec![ |
| 2401 | 0x51, 0x46, 0x49, 0xfb, // magic |
| 2402 | 0x00, 0x00, 0x00, 0x03, // version |
| 2403 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // backing file offset |
| 2404 | 0x00, 0x00, 0x00, 0x00, // backing file size |
| 2405 | 0x00, 0x00, 0x00, 0x09, // cluster_bits |
| 2406 | 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, // size |
| 2407 | 0x00, 0x00, 0x00, 0x00, // crypt method |
| 2408 | 0x00, 0x00, 0x01, 0x00, // L1 size |
| 2409 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // L1 table offset |
| 2410 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // refcount table offset |
| 2411 | 0x00, 0x00, 0x00, 0x03, // refcount table clusters |
| 2412 | 0x00, 0x00, 0x00, 0x00, // nb snapshots |
| 2413 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // snapshots offset |
| 2414 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // incompatible_features |
| 2415 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // compatible_features |
| 2416 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // autoclear_features |
| 2417 | 0x00, 0x00, 0x00, 0x04, // refcount_order |
| 2418 | 0x00, 0x00, 0x00, 0x68, // header_length |
| 2419 | ] |
| 2420 | } |
| 2421 | |
| 2422 | fn basic_file(header: &[u8]) -> RawFile { |
| 2423 | let mut disk_file: RawFile = RawFile::new(TempFile::new().unwrap().into_file(), false); |
no outgoing calls
no test coverage detected