summaryrefslogtreecommitdiff
path: root/src/login/login.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-10-25 00:42:05 +0200
committerHaru <haru@dotalux.com>2014-10-25 00:42:05 +0200
commit3e1fe0d3842aab1c85f4dfd8e3533ca6631fc4e5 (patch)
tree91414ec9aad216e7297a700dd9bec8c08d668502 /src/login/login.c
parentab3b5bd8d231434d0c3fb4db0d977e96613b4e77 (diff)
downloadhercules-3e1fe0d3842aab1c85f4dfd8e3533ca6631fc4e5.tar.gz
hercules-3e1fe0d3842aab1c85f4dfd8e3533ca6631fc4e5.tar.bz2
hercules-3e1fe0d3842aab1c85f4dfd8e3533ca6631fc4e5.tar.xz
hercules-3e1fe0d3842aab1c85f4dfd8e3533ca6631fc4e5.zip
Added some missing variable initializations
- The issue was caused by memcmp failing because of garbage in structs padding. - Fixes bugreport:8410, special thanks (and credits for the fix) to Garr http://hercules.ws/board/tracker/issue-8410-autotradeat-issue/ - Also reduced scope of some variables, where appropriate. - Thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/login/login.c')
-rw-r--r--src/login/login.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/login/login.c b/src/login/login.c
index 828afb22b..129049627 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -1651,6 +1651,7 @@ int login_config_read(const char* cfgName)
else if(!strcmpi(w1, "client_hash")) {
int group = 0;
char md5[33];
+ memset(md5, '\0', 33);
if (sscanf(w2, "%d, %32s", &group, md5) == 2) {
struct client_hash_node *nnode;