about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2012-08-16 23:51:28 +0200
committerAlexander Barton <alex@barton.de>2012-08-16 23:51:28 +0200
commitd48e440a722cb56fd3c2996d2d3c87ce7f471042 (patch)
tree92ed477b0516a0b664e438ad1307c0bf2215e07d /src
parent0709a0f050044db2d76a3142f02f7efd86321898 (diff)
downloadngircd-d48e440a722cb56fd3c2996d2d3c87ce7f471042.tar.gz
ngircd-d48e440a722cb56fd3c2996d2d3c87ce7f471042.zip
Fix a buffer overflow when initializing the random salt for "+x"
This "off by one" buffer overflow has been introduced in commit 49385a98,
"Implemented hashed cloaked hostnames for +x".
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/conf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c
index b0911373..923cdc02 100644
--- a/src/ngircd/conf.c
+++ b/src/ngircd/conf.c
@@ -653,7 +653,7 @@ static void
 Set_Defaults(bool InitServers)
 {
 	int i;
-	char random[RANDOM_SALT_LEN];
+	char random[RANDOM_SALT_LEN + 1];
 
 	/* Global */
 	strcpy(Conf_ServerName, "");