aquatic_http: check info_hash and peer_id len when deserializing

This commit is contained in:
Joakim Frostegård 2020-07-02 15:29:01 +02:00
parent 5e7f8bea20
commit c8de9857f8
3 changed files with 33 additions and 61 deletions

View file

@ -184,6 +184,13 @@ pub fn run_handshake_and_read_requests<'a>(
debug!("read request, sending to handler");
if let Request::Announce(ref request) = request {
for (i, c) in request.info_hash.0.chars().enumerate() {
debug!("{}: {}", i, c.escape_unicode());
}
debug!("request info hash char count: {}", request.info_hash.0.chars().count());
}
if let Err(err) = request_channel_sender
.send((meta, request))
{