From: Alexander Barton Date: Thu, 16 Aug 2012 21:51:28 +0000 (+0200) Subject: Fix a buffer overflow when initializing the random salt for "+x" X-Git-Tag: rel-20-rc1~114 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=commitdiff_plain;h=d48e440a722cb56fd3c2996d2d3c87ce7f471042 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". --- 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, "");