1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 06:53:12 +02:00

Fix a crash when mysql is used without MysqlSecure defined. Thanks to

jerrcs for finding and testing


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2364 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
adam-
2009-07-07 21:02:38 +00:00
parent feedbd6b0d
commit a30afed7b2
+4 -1
View File
@@ -250,7 +250,10 @@ char *db_mysql_secure(char *pass, int size)
{
char tmp_pass[PASSMAX];
char *str, *tmp;
unsigned bufsize = (2 * PASSMAX + 15 + strlen(MysqlSecure));
unsigned bufsize = (2 * PASSMAX + 15);
if (MysqlSecure)
bufsize += strlen(MysqlSecure);
/* Initialize the buffer. Bug #86 */
memset(tmp_pass, 0, PASSMAX);