Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-release-src > by-pkgid > 5eeb4b528dfe82a7b654fbbc1c8f0a6e > files > 1

cfengine3-3.0.4-2mdv2010.1.src.rpm

--- src/communication.c.str	2009-12-31 03:58:48.000000000 +0100
+++ src/communication.c	2009-12-31 03:59:22.000000000 +0100
@@ -308,7 +308,7 @@
 if ((err = getaddrinfo(ipaddress,NULL,&query,&response)) != 0)
    {
    CfOut(cf_inform,"","Unable to lookup IP address (%s): %s",ipaddress,gai_strerror(err));
-   snprintf(hostbuffer,MAXHOSTNAMELEN-1,ipaddress); 
+   snprintf(hostbuffer,MAXHOSTNAMELEN-1,"%s",ipaddress); 
    return hostbuffer;
    }
 
@@ -316,7 +316,7 @@
    {   
    if ((err = getnameinfo(ap->ai_addr,ap->ai_addrlen,hostbuffer,MAXHOSTNAMELEN,0,0,0)) != 0)
       {
-      snprintf(hostbuffer,MAXHOSTNAMELEN-1,ipaddress);
+      snprintf(hostbuffer,MAXHOSTNAMELEN-1,"%s",ipaddress);
       freeaddrinfo(response);
       return hostbuffer;
       }
@@ -326,7 +326,7 @@
    return hostbuffer;
    }
 
- snprintf(hostbuffer,MAXHOSTNAMELEN-1,ipaddress);
+ snprintf(hostbuffer,MAXHOSTNAMELEN-1,"%s",ipaddress);
  
 #else