diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-04-24 11:15:24 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-04-24 11:15:24 +0200 |
commit | 9c54bf41d02ba236137859ea5f12d6f048647349 (patch) | |
tree | 368814acd55e462358c23cf4471bfa91b13d18bc | |
parent | d0cefac7a766d0f02ca76fcaeb6cfbace695b925 (diff) | |
download | rsyslog-9c54bf41d02ba236137859ea5f12d6f048647349.tar.gz rsyslog-9c54bf41d02ba236137859ea5f12d6f048647349.tar.bz2 rsyslog-9c54bf41d02ba236137859ea5f12d6f048647349.zip |
bugfix: off-by-one error in handling local FQDN name (regression)
A remporary buffer was allocated one byte too small. Did only
affect startup, not actual operations. Came up during routine tests,
and can have no effect once the engine runs. Bug was introduced in
7.3.11.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | tools/syslogd.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -10,6 +10,11 @@ Version 7.3.12 [devel] 2013-04-?? do not use GCRY_CIPHER_MODE_AESWRAP where not available - fix compile on Solaris Thanks to Martin Carpenter for the patch. +- bugfix: off-by-one error in handling local FQDN name (regression) + A remporary buffer was allocated one byte too small. Did only + affect startup, not actual operations. Came up during routine tests, + and can have no effect once the engine runs. Bug was introduced in + 7.3.11. - bugfix: block size limit was not properly honored - bugfix: potential segfault in guardtime signature provider it could segfault if an error was reported by the GuardTime API, because diff --git a/tools/syslogd.c b/tools/syslogd.c index fe1205dd..1b38bf92 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -1530,7 +1530,7 @@ queryLocalHostname(void) glbl.SetLocalDomain(LocalDomain); if ( strlen((char*)LocalDomain) ) { - CHKmalloc(LocalFQDNName = (uchar*)malloc(strlen((char*)LocalDomain)+strlen((char*)LocalHostName)+1)); + CHKmalloc(LocalFQDNName = (uchar*)malloc(strlen((char*)LocalDomain)+strlen((char*)LocalHostName)+2));/* one for dot, one for NUL! */ if ( sprintf((char*)LocalFQDNName,"%s.%s",(char*)LocalHostName,(char*)LocalDomain) ) glbl.SetLocalFQDNName(LocalFQDNName); } |