MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / valid_header_v2

Function valid_header_v2

block/src/qcow/mod.rs:2380–2396  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2378 }
2379
2380 fn valid_header_v2() -> Vec<u8> {
2381 vec![
2382 0x51u8, 0x46, 0x49, 0xfb, // magic
2383 0x00, 0x00, 0x00, 0x02, // version
2384 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // backing file offset
2385 0x00, 0x00, 0x00, 0x00, // backing file size
2386 0x00, 0x00, 0x00, 0x10, // cluster_bits
2387 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, // size
2388 0x00, 0x00, 0x00, 0x00, // crypt method
2389 0x00, 0x00, 0x01, 0x00, // L1 size
2390 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // L1 table offset
2391 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // refcount table offset
2392 0x00, 0x00, 0x00, 0x03, // refcount table clusters
2393 0x00, 0x00, 0x00, 0x00, // nb snapshots
2394 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // snapshots offset
2395 ]
2396 }
2397
2398 // Test case found by clusterfuzz to allocate excessive memory.
2399 fn test_huge_header() -> Vec<u8> {

Callers 6

header_readFunction · 0.85
test_headerFunction · 0.85

Calls

no outgoing calls

Tested by 6

header_readFunction · 0.68
test_headerFunction · 0.68