Subject: Bug#3526: syslogd dumps core when no domainname has been set

From: llucius <[email-masked]>
Date: Fri, 5 Jul 1996 16:47:06 -0500 (CDT)

Package: sysklogd
Version: 1.3-6

If you haven't set your domainname, syslogd will dump core upon startup.  
To recreate, simply set your domainname to "" using "domainname" or 
remove it from /etc/hosts.  

Here's a "possible" fix:

--- orig/sysklogd-1.3/syslogd.c	Mon May 27 18:01:51 1996
+++ sysklogd-1.3/syslogd.c	Fri Jul  5 16:38:09 1996
@@ -730,11 +730,14 @@
 		 * we want to distribute good software.  Joey
 		 */
 		hent = gethostbyname(LocalHostName);
-		sprintf(LocalHostName, "%s", hent->h_name);
-		if ( (p = index(LocalHostName, '.')) )
+		if (hent != NULL)
 		{
-			*p++ = '\0';
-			LocalDomain = p;
+			sprintf(LocalHostName, "%s", hent->h_name);
+			if ( (p = index(LocalHostName, '.')) )
+			{	
+				*p++ = '\0';
+				LocalDomain = p;
+			}
 		}
 	}