MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / fuzz_out_of_bounds_offset

Function fuzz_out_of_bounds_offset

nodedb-query/src/msgpack_scan/index.rs:288–291  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

286 /// Out-of-bounds offset must return None.
287 #[test]
288 fn fuzz_out_of_bounds_offset() {
289 let buf = encode(&json!({"x": 1}));
290 assert!(FieldIndex::build(&buf, buf.len() + 100).is_none());
291 }
292
293 /// Threshold boundary: a 16-field doc should use Flat, 17-field should
294 /// use HashMap. Fuzz both paths with truncation.

Callers

nothing calls this directly

Calls 1

encodeFunction · 0.70

Tested by

no test coverage detected