Fix unitialized data when creating TOSERVER_INIT packet
authorLoic Blot <loic.blot@unix-experience.fr>
Sun, 8 Mar 2015 16:42:06 +0000 (17:42 +0100)
committerLoic Blot <loic.blot@unix-experience.fr>
Sun, 8 Mar 2015 17:03:43 +0000 (18:03 +0100)
src/client.cpp

index edf24445298971f56cc124e631fe5338fdab0a70..ba6835f513239abb49f668c211e9d5c8af1a863d 100644 (file)
@@ -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());