- curve25519-dalek-ng -> curve25519-dalek 4. - fuzz/: cargo-fuzz targets for packets, commands and the license chain, plus a nightly workflow. Fixes for the panics they found: empty license, unchecked license property bounds, wrong index in the C2S audio invalid-codec error. - tsc-model: ServerVersion/ServerFlavor/Capabilities parsed from virtualserver_version; tsctl shows the flavor in the tree header. - CI lints every non-vendored crate via scripts/own-crates.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
25 lines
739 B
Rust
25 lines
739 B
Rust
//! Decrypted command payloads, parsed into typed messages.
|
|
#![no_main]
|
|
|
|
use libfuzzer_sys::fuzz_target;
|
|
use ts_bookkeeping::messages::s2c::InMessage;
|
|
use tsproto_packets::commands::CommandParser;
|
|
use tsproto_packets::packets::{Direction, InPacket};
|
|
|
|
/// S2C header: 8 byte MAC, packet id 1, type Command with the NewProtocol flag.
|
|
const HEADER: [u8; 11] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x22];
|
|
|
|
fuzz_target!(|data: &[u8]| {
|
|
let (_, args) = CommandParser::new(data);
|
|
for arg in args {
|
|
let _ = format!("{arg:?}");
|
|
}
|
|
|
|
let mut packet = HEADER.to_vec();
|
|
packet.extend_from_slice(data);
|
|
let packet = InPacket::new(Direction::S2C, &packet);
|
|
if let Ok(msg) = InMessage::new(&packet.header(), data) {
|
|
let _ = format!("{msg:?}");
|
|
}
|
|
});
|