maint(network): very good fix
This commit is contained in:
parent
e2e5e281c2
commit
6b849fdb21
@ -97,6 +97,11 @@ namespace network
|
||||
// Rather than try and let the player in, just tell them they are a duplicate player and reject connection
|
||||
game::NET_OutOfBandPrint(game::NS_SERVER, from, "error\nYou are already connected to the server.");
|
||||
}
|
||||
|
||||
void* memmove_stub(void* dest, const void* src, std::size_t count)
|
||||
{
|
||||
return std::memmove(dest, src, std::min<std::size_t>(count, 1262));
|
||||
}
|
||||
}
|
||||
|
||||
void on(const std::string& command, const callback& callback)
|
||||
@ -275,6 +280,9 @@ namespace network
|
||||
|
||||
// ignore built in "print" oob command for security reasons
|
||||
utils::hook::set<std::uint8_t>(0x14020A723, 0xEB);
|
||||
|
||||
// patch buffer overflow
|
||||
utils::hook::call(0x1403DA8A4, memmove_stub); // NET_GetDeferredClientPacket
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user