You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2007/07/30 15:16:03 UTC

svn commit: r560971 - /spamassassin/trunk/spamc/libspamc.c

Author: jm
Date: Mon Jul 30 06:16:03 2007
New Revision: 560971

URL: http://svn.apache.org/viewvc?view=rev&rev=560971
Log:
bug 5577: spamc on win32 reported corrupt error messages if spamd host was unresolveable or unconnectable. fix

Modified:
    spamassassin/trunk/spamc/libspamc.c

Modified: spamassassin/trunk/spamc/libspamc.c
URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamc/libspamc.c?view=diff&rev=560971&r1=560970&r2=560971
==============================================================================
--- spamassassin/trunk/spamc/libspamc.c (original)
+++ spamassassin/trunk/spamc/libspamc.c Mon Jul 30 06:16:03 2007
@@ -530,6 +530,10 @@
 	    addrbuf.sin_addr = tp->hosts[hostix];
 	    
 	    ipaddr = inet_ntoa(addrbuf.sin_addr);
+
+            /* make a copy in host, for logging (bug 5577) */
+            strncpy (host, ipaddr, sizeof(host) - 1);
+
 #ifdef DO_CONNECT_DEBUG_SYSLOGS
 	    libspamc_log(tp->flags, LOG_DEBUG,
 			 "dbg: connect(AF_INET) to spamd at %s (try #%d of %d)",