mirror of
https://github.com/celisej567/abaddon.git
synced 2026-01-04 10:10:03 +03:00
fix bad vector access in discovery (#167)
This commit is contained in:
@@ -383,7 +383,7 @@ void DiscordVoiceClient::Discovery() {
|
||||
const auto response = m_udp.Receive();
|
||||
if (response.size() >= 74 && response[0] == 0x00 && response[1] == 0x02) {
|
||||
const char *ip = reinterpret_cast<const char *>(response.data() + 8);
|
||||
uint16_t port = (response[73] << 8) | response[74];
|
||||
uint16_t port = (response[72] << 8) | response[73];
|
||||
m_log->info("Discovered IP and port: {}:{}", ip, port);
|
||||
SelectProtocol(ip, port);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user