[chocolate-doom] 58/79: Only accept sane player values when starting a new game.

Jonathan Dowland jmtd at moszumanska.debian.org
Mon Jan 30 15:07:25 UTC 2017


This is an automated email from the git hooks/post-receive script.

jmtd pushed a commit to annotated tag chocolate-doom-0.1.3
in repository chocolate-doom.

commit c1e37f1955a0c546a795484acc92510e4c4dc6b2
Author: Simon Howard <fraggle at gmail.com>
Date:   Fri Jan 13 02:19:18 2006 +0000

    Only accept sane player values when starting a new game.
    
    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 286
---
 src/net_client.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/net_client.c b/src/net_client.c
index c071d37..e08a9f9 100644
--- a/src/net_client.c
+++ b/src/net_client.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: net_client.c 285 2006-01-12 02:18:59Z fraggle $
+// $Id: net_client.c 286 2006-01-13 02:19:18Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -21,6 +21,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.19  2006/01/13 02:19:18  fraggle
+// Only accept sane player values when starting a new game.
+//
 // Revision 1.18  2006/01/12 02:18:59  fraggle
 // Only start new games when in the waiting-for-start state.
 //
@@ -259,6 +262,12 @@ static void NET_CL_ParseGameStart(net_packet_t *packet)
         return;
     }
 
+    if (num_players >= MAXPLAYERS || player_number >= num_players)
+    {
+        // insane values
+        return;
+    }
+
     // Start the game
 
     consoleplayer = player_number;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/chocolate-doom.git



More information about the Pkg-games-commits mailing list