mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-07-01 15:36:10 +00:00
fix potential UB in decompression
This commit is contained in:
parent
f94b9adf7a
commit
b034072027
@ -51,9 +51,11 @@ void UDPParser(std::string_view Packet) {
|
||||
if (Packet.substr(0, 4) == "ABG:") {
|
||||
auto substr = Packet.substr(4);
|
||||
auto res = DeComp(std::span<const char>(substr.data(), substr.size()));
|
||||
Packet = std::string(res.data(), res.size());
|
||||
std::string DeCompPacket = std::string(res.data(), res.size());
|
||||
ServerParser(DeCompPacket);
|
||||
} else {
|
||||
ServerParser(Packet);
|
||||
}
|
||||
ServerParser(Packet);
|
||||
}
|
||||
void UDPRcv() {
|
||||
sockaddr_in FromServer {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user