mirror of
https://git.mentality.rip/numas13/xash3d-master.git
synced 2025-01-22 12:54:24 +00:00
protocol: check port in QueryServersResponse::key
This commit is contained in:
parent
b954c7a1f6
commit
23c00dd071
@ -63,7 +63,7 @@ impl<'a> QueryServersResponse<&'a [u8]> {
|
|||||||
let s = cur.get_bytes(cur.remaining())?;
|
let s = cur.get_bytes(cur.remaining())?;
|
||||||
|
|
||||||
// extra header for key sent in QueryServers packet
|
// 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]])))
|
(&s[6..], Some(u32::from_le_bytes([s[1], s[2], s[3], s[4]])))
|
||||||
} else {
|
} else {
|
||||||
(s, None)
|
(s, None)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user