M1: dalek 4, fuzzing and fixes, tsc-model with server flavor

- 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
This commit is contained in:
Claude committed 2026-09-25 13:40:56 +00:00
1 parent 369cbde85d
commit aa19afbcd0
24 files changed
+1835 -57

No files matched your search

+10 -2
View File
@@ -659,7 +659,7 @@ impl<'a> AudioData<'a> {
Ok(AudioData::C2S {
id,
codec: CodecType::from_u8(content[2])
.ok_or_else(|| Error::InvalidCodec(content[4]))?,
.ok_or_else(|| Error::InvalidCodec(content[2]))?,
data: &content[3..],
})
}
@@ -679,7 +679,7 @@ impl<'a> AudioData<'a> {
return Err(Error::PacketContentTooShort(content.len()));
}
let codec =
CodecType::from_u8(content[2]).ok_or_else(|| Error::InvalidCodec(content[4]))?;
CodecType::from_u8(content[2]).ok_or_else(|| Error::InvalidCodec(content[2]))?;
if newprotocol {
if content.len() < 14 {
return Err(Error::PacketContentTooShort(content.len()));
@@ -1187,6 +1187,14 @@ impl OutAudio {
#[cfg(test)]
mod tests {
#[test]
fn short_c2s_audio_with_invalid_codec_is_an_error() {
// Packet id + invalid codec byte, shorter than the old error path indexed.
for p_type in [PacketType::Voice, PacketType::VoiceWhisper] {
assert!(AudioData::parse(p_type, false, Direction::C2S, &[0, 1, 0xff]).is_err());
}
}
use super::*;
fn test_audio_roundtrip(dir: Direction, data: &AudioData) {