MCPcopy Create free account
hub / github.com/FuzzAnything/PromptFuzz / parse_driver_id

Function parse_driver_id

src/program/libfuzzer.rs:511–518  ·  view source on GitHub ↗
(artifact: &[u8])

Source from the content-addressed store, hash-verified

509}
510
511fn parse_driver_id(artifact: &[u8]) -> Option<u16> {
512 if artifact.len() < 2 {
513 return None;
514 }
515 let switch_bytes: [u8; 2] = [artifact[0], artifact[1]];
516 let switch_id: u16 = u16::from_be_bytes(switch_bytes);
517 Some(switch_id)
518}
519
520fn mask_driver_from_fuzzer(fuzzer_path: &Path, driver_id: u16) -> Result<()> {
521 let mut content = std::fs::read_to_string(fuzzer_path)?;

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected