diff options
author | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-10-18 08:08:01 +0000 |
---|---|---|
committer | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-10-18 08:08:01 +0000 |
commit | 9911e0abb2892bb0256c4b8c06f3836211c02b9d (patch) | |
tree | b8d89ff597fa88b93781cdc38a89b8bdfbd95f96 /src/mysql.c | |
parent | 706c469cf6b427560ac125155f0a19311389ec4f (diff) |
BUILD : 1.7.17 (1187) BUGS : N/A NOTES : Put mysql secure back to how it should be - i think
git-svn-id: svn://svn.anope.org/anope/trunk@1187 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@907 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/mysql.c')
-rw-r--r-- | src/mysql.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mysql.c b/src/mysql.c index d58a4a9e9..011c8b615 100644 --- a/src/mysql.c +++ b/src/mysql.c @@ -238,12 +238,13 @@ char *db_mysql_secure(char *pass) /* Initialize the buffer. Bug #86 */ memset(epass, '\0', BUFSIZE); + memset(tmp_pass, 0, PASSMAX); /* We couldnt decrypt the pass... */ if(enc_decrypt(pass,tmp_pass,PASSMAX)!=1) { snprintf(epass, sizeof(epass), "'%s'", pass); } else { /* if we could decrypt the pass */ - if (tmp_pass) { + if (!tmp_pass) { snprintf(epass, sizeof(epass), "''"); } else if ((!MysqlSecure) || (strcmp(MysqlSecure, "") == 0)) { snprintf(epass, sizeof(epass), "'%s'", tmp_pass); @@ -258,7 +259,6 @@ char *db_mysql_secure(char *pass) MysqlSecure); } } - return sstrdup(epass); } |