File: server_name.rs

package info (click to toggle)
rust-rustls 0.23.26%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,816 kB
  • sloc: sh: 199; python: 181; makefile: 23
file content (12 lines) | stat: -rw-r--r-- 271 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
#![no_main]
#[macro_use]
extern crate libfuzzer_sys;
extern crate rustls;

use rustls::pki_types::ServerName;

fuzz_target!(|data: &[u8]| {
    let _ = std::str::from_utf8(data)
        .map_err(|_| ())
        .and_then(|s| ServerName::try_from(s).map_err(|_| ()));
});