From 23c00dd071dbba4c7fa180b9c9249f74a7aafaf5 Mon Sep 17 00:00:00 2001 From: Denis Drakhnia Date: Mon, 23 Oct 2023 08:12:11 +0300 Subject: [PATCH] protocol: check port in QueryServersResponse::key --- protocol/src/master.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/src/master.rs b/protocol/src/master.rs index 3152eaa..4b61ddc 100644 --- a/protocol/src/master.rs +++ b/protocol/src/master.rs @@ -63,7 +63,7 @@ impl<'a> QueryServersResponse<&'a [u8]> { let s = cur.get_bytes(cur.remaining())?; // extra header for key sent in QueryServers packet - let (s, key) = if s.len() >= 6 && s[0] == 0x7f { + let (s, key) = if s.len() >= 6 && s[0] == 0x7f && s[5] == 8 { (&s[6..], Some(u32::from_le_bytes([s[1], s[2], s[3], s[4]]))) } else { (s, None)