From 7c7034a22934e26181236307555bc785fa14cb8e Mon Sep 17 00:00:00 2001 From: fickleheart Date: Sat, 9 Mar 2019 16:49:23 -0600 Subject: [PATCH] More... --- src/d_clisrv.c | 10 +++++----- src/d_clisrv.h | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 6ff024cd..6d139114 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1139,9 +1139,9 @@ static cl_mode_t cl_mode = CL_SEARCHING; static boolean cl_needsdownload = false; static UINT8 cl_challengenum = 0; -static UINT8 cl_challengequestion[17]; +static UINT8 cl_challengequestion[MD5_LEN+1]; static char cl_challengepassword[65]; -static UINT8 cl_challengeanswer[17]; +static UINT8 cl_challengeanswer[MD5_LEN+1]; static UINT8 cl_challengeattempted = 0; // Player name send/load @@ -1322,7 +1322,7 @@ static boolean CL_SendJoin(void) netbuffer->u.clientcfg.subversion = SUBVERSION; netbuffer->u.clientcfg.needsdownload = cl_needsdownload; netbuffer->u.clientcfg.challengenum = cl_challengenum; - memcpy(netbuffer->u.clientcfg.challengeanswer, cl_challengeanswer, 16); + memcpy(netbuffer->u.clientcfg.challengeanswer, cl_challengeanswer, MD5_LEN); return HSendPacket(servernode, true, 0, sizeof (clientconfig_pak)); } @@ -3267,8 +3267,8 @@ void D_ClientServerInit(void) gametic = 0; localgametic = 0; - memset(cl_challengequestion, 0x00, 17); - memset(cl_challengeanswer, 0x00, 17); + memset(cl_challengequestion, 0x00, MD5_LEN+1); + memset(cl_challengeanswer, 0x00, MD5_LEN+1); // do not send anything before the real begin SV_StopServer(); diff --git a/src/d_clisrv.h b/src/d_clisrv.h index d979fb28..f3a9011e 100644 --- a/src/d_clisrv.h +++ b/src/d_clisrv.h @@ -19,6 +19,8 @@ #include "tables.h" #include "d_player.h" +#include "md5.h" + // Network play related stuff. // There is a data struct that stores network // communication related stuff, and another