enforce 6x command size limit

This commit is contained in:
Martin Michelsen
2023-10-07 18:22:58 -07:00
parent d5cc91a9bf
commit 07b1e9cde3
2 changed files with 3 additions and 1 deletions
+3
View File
@@ -2660,6 +2660,9 @@ static void on_61_98(shared_ptr<Client> c, uint16_t command, uint32_t flag, cons
static void on_6x_C9_CB(shared_ptr<Client> c, uint16_t command, uint32_t flag, const string& data) {
check_size_v(data.size(), 4, 0xFFFF);
if ((data.size() > 0x400) && (command != 0x6C) && (command != 0x6D)) {
throw runtime_error("non-extended game command data size is too large");
}
on_subcommand_multi(c, command, flag, data);
}