From 9c54bf41d02ba236137859ea5f12d6f048647349 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 24 Apr 2013 11:15:24 +0200 Subject: 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. --- ChangeLog | 5 +++++ tools/syslogd.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 34e09d79..18defb30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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); } -- cgit v1.2.3