maint(network): very good fix

This commit is contained in:
Jack Back 2024-03-31 22:33:05 +02:00
parent e2e5e281c2
commit 6b849fdb21

View File

@ -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
}
}
};