diff --git a/deps/mongoose b/deps/mongoose index 36a19279..68dd8d27 160000 --- a/deps/mongoose +++ b/deps/mongoose @@ -1 +1 @@ -Subproject commit 36a1927915f966f20486a80070f0428f2606a53a +Subproject commit 68dd8d277d7b5bb26daf04f08bef3030ad2d7725 diff --git a/deps/protobuf b/deps/protobuf index 70c1ac75..042993b3 160000 --- a/deps/protobuf +++ b/deps/protobuf @@ -1 +1 @@ -Subproject commit 70c1ac756d3cd8fa04725f82f0ad1a30404c3bb3 +Subproject commit 042993b3dd8c52f979870c91ea7fcbcf0dcf94a0 diff --git a/src/Components/Modules/QuickPatch.cpp b/src/Components/Modules/QuickPatch.cpp index 46416daf..df73b1c2 100644 --- a/src/Components/Modules/QuickPatch.cpp +++ b/src/Components/Modules/QuickPatch.cpp @@ -82,14 +82,28 @@ namespace Components int QuickPatch::MsgReadBitsCompressCheckSV(const char *from, char *to, int size) { + static char buffer[0x8000]; + if (size > 0x800) return 0; - return Game::MSG_ReadBitsCompress(from, to, size); + size = Game::MSG_ReadBitsCompress(from, buffer, size); + + if (size > 0x800) return 0; + memcpy(to, buffer, size); + + return size; } int QuickPatch::MsgReadBitsCompressCheckCL(const char *from, char *to, int size) { + static char buffer[0x100000]; + if (size > 0x20000) return 0; - return Game::MSG_ReadBitsCompress(from, to, size); + size = Game::MSG_ReadBitsCompress(from, buffer, size); + + if (size > 0x20000) return 0; + memcpy(to, buffer, size); + + return size; } QuickPatch::QuickPatch()