Browse code

Fix a bug in IPv4 local addresses

git-svn: trunk@3664

Nigel Horne authored on 2008/02/21 19:43:35
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+Thu Feb 21 09:42:33 GMT 2008 (njh)
2
+----------------------------------
3
+  * clamav-milter:	Fix a bug in IPv4 local addresses added by the patch
4
+  		applied on Tue Mar 27 22:05:28 BST 2007.
5
+
1 6
 Wed Feb 20 22:03:07 CET 2008 (tk)
2 7
 ---------------------------------
3 8
   * libclamav: filetype detection improvements:
... ...
@@ -33,7 +33,7 @@
33 33
  */
34 34
 static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.312 2007/02/12 22:24:21 njh Exp $";
35 35
 
36
-#define	CM_VERSION	"devel-20080110"
36
+#define	CM_VERSION	"devel-20080219"
37 37
 
38 38
 #if HAVE_CONFIG_H
39 39
 #include "clamav-config.h"
... ...
@@ -5287,7 +5287,7 @@ isLocal(const char *addr)
5287 5287
 
5288 5288
 #ifdef HAVE_INET_NTOP
5289 5289
 	if(inet_pton(AF_INET, addr, &ip) > 0)
5290
-		return isLocalAddr (ip.s_addr);
5290
+		return isLocalAddr(ip.s_addr);
5291 5291
 #ifdef AF_INET6
5292 5292
 	else if(inet_pton (AF_INET6, addr, &ip6) > 0) {
5293 5293
 		int i;
... ...
@@ -5311,11 +5311,9 @@ isLocal(const char *addr)
5311 5311
 			pnet6++;
5312 5312
 		 }
5313 5313
 	}
5314
-	return 0;
5315
-#endif /* AF_INET6 */
5316
-#else
5314
+#endif	/* AF_INET6 */
5315
+#endif	/* HAVE_INET_NTOP */
5317 5316
 	return isLocalAddr(inet_addr(addr));
5318
-#endif
5319 5317
 }
5320 5318
 
5321 5319
 /*
... ...
@@ -5932,7 +5930,8 @@ print_trace(void)
5932 5932
  *
5933 5933
  * You wouldn't believe the amount of time I used to waste chasing bug reports
5934 5934
  *	from people who's sendmail.cf didn't tally with the arguments given to
5935
- *	clamav-milter before I put this check in!
5935
+ *	clamav-milter before I put this check in, which is why bug 726 must
5936
+ *	never be acted upon.
5936 5937
  *
5937 5938
  * FIXME: return different codes for "the value is wrong" and "sendmail.cf"
5938 5939
  *	hasn't been set up, though that's not so easy to work out.