--- cfingerd-1.4.3.orig/src/util.c
+++ cfingerd-1.4.3/src/util.c
@@ -178,7 +178,7 @@
 
 	    pos++;
 
-	    while((line[pos] != ' ') && (!done)) {
+	    while (line[pos] != ' ' && !done && newpos < 80) {
 		command[newpos] = line[pos];
 
 		if (line[pos] == ' ')
@@ -298,7 +298,7 @@
 	    for(x = 0; x < center_dist; x++)
 		printf(" ");
 
-	printf(displine);
+	printf("%s", displine);
 
 	free(displine);
     }
@@ -465,7 +465,7 @@
     ret = (char *) malloc(strlen((char *) hostname) +
 			  strlen((char *) domname) + 2);
 
-    snprintf(ret, sizeof(ret), "%s.%s", (char *) hostname, (char *) domname);
+    sprintf(ret, "%s.%s", (char *) hostname, (char *) domname);
     return(ret);
 }
 
@@ -483,7 +483,7 @@
 	    host, prog_config.p_strings[D_REJECT_HOST]);
 	if (prog_config.config_bits2 & SHOW_REJECTED)
 	    display_file(NOBODY_UID, NOBODY_GID, rejected_display);
-	log(LOG_IDENT, "Unknown not allowed from ", host);
+	mylog(LOG_IDENT, "Unknown not allowed from ", host);
 
 	exit(PROGRAM_OKAY);
     }
@@ -537,7 +537,7 @@
 	    if (prog_config.config_bits2 & SHOW_REJECTED)
 		display_file(NOBODY_UID, NOBODY_GID, rejected_display);
 
-	    log(LOG_REJECTED, "Rejected host finger detected to ", host);
+	    mylog(LOG_REJECTED, "Rejected host finger detected to ", host);
 
 	    exit(PROGRAM_OKAY);
 	}
@@ -588,7 +588,6 @@
 	memset (line, 0, 600);
 	while ((read (fd[0], line, sizeof (line)-1)) > 0) {
 	    if ((size += strlen (line)) < MAX_POPEN_BUF) {
-		syslog (LOG_INFO, "Reallocating %d bytes", size);
 		if ((result = (char *) realloc (result, size+1)) == NULL) {
 		    return NULL;
 		}
