From: Loic Blot Date: Sun, 8 Mar 2015 16:42:06 +0000 (+0100) Subject: Fix unitialized data when creating TOSERVER_INIT packet X-Git-Tag: 0.4.13~509 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=57d86cf57411225433c651cf50fe9e130cf407e3;p=oweals%2Fminetest.git Fix unitialized data when creating TOSERVER_INIT packet --- diff --git a/src/client.cpp b/src/client.cpp index edf244452..ba6835f51 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -401,6 +401,8 @@ void Client::step(float dtime) char pName[PLAYERNAME_SIZE]; char pPassword[PASSWORD_SIZE]; + bzero(pName, PLAYERNAME_SIZE); + bzero(pPassword, PLAYERNAME_SIZE); snprintf(pName, PLAYERNAME_SIZE, "%s", myplayer->getName()); snprintf(pPassword, PASSWORD_SIZE, "%s", m_password.c_str());