From e76f5bbe8ce08bc00fb4a4ad26a9418dac663639 Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 22 Jul 2003 16:31:39 +0000 Subject: [PATCH] use proper string for conn->address when accepting a new client (otherwise it could easily be so bogus as to trash the netconn structure) thanks very much to Tomaz for tracking down this major bug git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3304 d7cf8633-e32d-0410-b094-e92efae38249 --- netconn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netconn.c b/netconn.c index ab269e98..363fbb9e 100755 --- a/netconn.c +++ b/netconn.c @@ -1012,9 +1012,9 @@ int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, qbyte *data, int length, if ((conn = NetConn_Open(mysocket, peeraddress))) { // allocated connection - strcpy(conn->address, addressstring2); + LHNETADDRESS_ToString(peeraddress, conn->address, sizeof(conn->address), true); if (developer.integer) - Con_Printf("Datagram_ParseConnectionless: sending \"accept\" to %s.\n", addressstring2); + Con_Printf("Datagram_ParseConnectionless: sending \"accept\" to %s.\n", conn->address); NetConn_WriteString(mysocket, "\377\377\377\377accept", peeraddress); // now set up the client struct SV_ConnectClient(clientnum, conn); -- 2.39.2