/*
- * Netris -- A free networked version of Tetris
- * Copyright (C) 1994,1995 Mark Weaver <Mark_Weaver@brown.edu>
+ * Netris -- A free networked version of T*tris
+ * Copyright (C) 1994,1995,1996 Mark H. Weaver <mhw@netris.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: inet.c,v 1.17 1995/07/11 08:53:25 mhw Exp $
+ * $Id: inet.c,v 1.18 1996/02/09 08:22:13 mhw Exp $
*/
#include "netris.h"
memcpy(data, netBuf, sizeof(data));
type = ntoh2(data[0]);
size = ntoh2(data[1]);
+ if (size >= sizeof(netBuf))
+ fatal("Received an invalid packet (too large), possibly an attempt\n"
+ " to exploit a vulnerability in versions before 0.52 !");
netBufGoal = size;
if (netBufSize < netBufGoal)
return E_none;
RemoveEventGen(&netGen);
}
+/*
+ * vi: ts=4 ai
+ * vim: noai si
+ */