1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 18:02:37 +01:00

(svn r22884) [1.1] -Backport from trunk:

- Fix: Perform stricter checks on some commands [FS#4745] (r22845)
- Fix: Harden savegame load against too many AI config settings [FS#4748] (r22843)
This commit is contained in:
frosch
2011-09-03 18:50:20 +00:00
parent a95c366f58
commit 7d984241f3
5 changed files with 8 additions and 5 deletions

View File

@@ -307,7 +307,7 @@ const char *NetworkGameSocketHandler::ReceiveCommand(Packet *p, CommandPacket *c
if (!IsValidCommand(cp->cmd)) return "invalid command";
if (GetCommandFlags(cp->cmd) & CMD_OFFLINE) return "offline only command";
if ((cp->cmd & CMD_FLAGS_MASK) != 0) return "invalid command flag";
if (callback > lengthof(_callback_table)) return "invalid callback";
if (callback >= lengthof(_callback_table)) return "invalid callback";
cp->callback = _callback_table[callback];
return NULL;