quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.85k stars 394 forks source link

Fix handling of invalid retry token lengths #1335

Closed Ralith closed 2 years ago

Ralith commented 2 years ago

Fixes https://github.com/quinn-rs/quinn/issues/1334.

5225225 commented 2 years ago
#[test]
fn server_does_not_panic() {
    let _guard = subscribe();
    let client_addr = "[::2]:7890".parse().unwrap();
    let mut server = Endpoint::new(Default::default(), Some(Arc::new(server_config())));
    server.handle(
        Instant::now(),
        client_addr,
        None,
        None,
        hex!("8900 0000 0101 0000 1b1b 841b 0000 0000 3f00")[..].into(),
    );
}

This is a test case for this. (in quinn-proto/src/tests/mod.rs).

Ralith commented 2 years ago

Thanks!