#![no_main] //! Fuzz the authorized_keys parser, including its option lexer and the //! ssh-ed25519 public-key blob parser it depends on. None may panic. use libfuzzer_sys::fuzz_target; use dosh::native::{parse_authorized_keys, parse_ssh_ed25519_public_blob}; fuzz_target!(|data: &[u8]| { // The blob parser operates directly on raw bytes. let _ = parse_ssh_ed25519_public_blob(data); // The line parser operates on text; only feed valid UTF-8 (lossless), // matching how the file is read in production via read_to_string. if let Ok(text) = std::str::from_utf8(data) { let _ = parse_authorized_keys(text); } });