summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2007-01-08 19:18:53 +0000
committerDarkvater <Darkvater@openttd.org>2007-01-08 19:18:53 +0000
commit35ea3335ce92e4b990613cb1671206ee51b560c4 (patch)
tree49d2a806398eaa918a9df6f47ea59db425579237 /src/network
parent99cb1dd612d4e8eaa499eae6da643b703be59456 (diff)
downloadopenttd-35ea3335ce92e4b990613cb1671206ee51b560c4.tar.xz
(svn r7984) -Fix: out-of-bounds read access on _clients array (Quark)
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/network.c b/src/network/network.c
index d3bad7574..ac8dd82b7 100644
--- a/src/network/network.c
+++ b/src/network/network.c
@@ -81,7 +81,7 @@ NetworkClientState *NetworkFindClientStateFromIndex(uint16 client_index)
{
NetworkClientState *cs;
- for (cs = _clients; cs != &_clients[MAX_CLIENT_INFO]; cs++) {
+ for (cs = _clients; cs != endof(_clients); cs++) {
if (cs->index == client_index) return cs;
}