summaryrefslogtreecommitdiff
path: root/src/mysql.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mysql.c')
-rw-r--r--src/mysql.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mysql.c b/src/mysql.c
index 64b538776..932b6a5db 100644
--- a/src/mysql.c
+++ b/src/mysql.c
@@ -232,8 +232,10 @@ char *db_mysql_secure(char *pass)
memset(epass, '\0', BUFSIZE);
#ifdef USE_ENCRYPTION
- /* If we use the builtin encryption don't double encrypt! */
- snprintf(epass, sizeof(epass), "'%s'", pass);
+ if (pass) {
+ /* If we use the builtin encryption don't double encrypt! */
+ snprintf(epass, sizeof(epass), "'%s'", pass);
+ }
#else
if (!pass) {