Improved handling of /etc/hosts file

git-svn: trunk@2540
remotes/push_mirror/metadata
Nigel Horne 19 years ago
parent a7dcab722e
commit 343396aa77
  1. 4
      clamav-devel/ChangeLog
  2. 7
      clamav-devel/clamav-milter/clamav-milter.c

@ -1,3 +1,7 @@
Wed Dec 6 14:53:39 GMT 2006 (njh)
----------------------------------
* clamav-milter: Improved handling of incorrect /etc/hosts files
Tue Dec 5 03:18:06 CET 2006 (tk)
---------------------------------
* libclamav/unrar/unrar.c: fix return value of rar_unpack() (bb#182)

@ -24,9 +24,9 @@
*
* For installation instructions see the file INSTALL that came with this file
*/
static char const rcsid[] = "$Id: clamav-milter.c,v 1.301 2006/12/02 15:17:02 njh Exp $";
static char const rcsid[] = "$Id: clamav-milter.c,v 1.302 2006/12/06 14:53:24 njh Exp $";
#define CM_VERSION "devel-021206"
#define CM_VERSION "devel-061206"
#if HAVE_CONFIG_H
#include "clamav-config.h"
@ -3202,7 +3202,8 @@ clamfi_eom(SMFICTX *ctx)
*/
struct hostent hostent;
if(r_gethostbyname(hostname, &hostent, buf, sizeof(buf)) == 0)
if((r_gethostbyname(hostname, &hostent, buf, sizeof(buf)) == 0) &&
hostent.h_name)
strncpy(hostname, hostent.h_name, sizeof(hostname));
}

Loading…
Cancel
Save