]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Radu Greab (radu@netsoft.ro):
authorwessels <>
Wed, 8 Nov 2000 06:43:15 +0000 (06:43 +0000)
committerwessels <>
Wed, 8 Nov 2000 06:43:15 +0000 (06:43 +0000)
 - If an AS contains networks with mask 0, when trying to view the
   AS Number Database squid enters into an infinite loop. The patch
   below fixes the problem.

src/asn.cc

index da67343ec92f94c210c4cb0cc6e913214f37e496..54d3f3a0f086dd012fd7b13a6d506c680fa4fce7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: asn.cc,v 1.63 2000/06/06 19:34:31 hno Exp $
+ * $Id: asn.cc,v 1.64 2000/11/07 23:43:15 wessels Exp $
  *
  * DEBUG: section 53    AS Number handling
  * AUTHOR: Duane Wessels, Kostas Anagnostakis
@@ -412,6 +412,8 @@ int
 mask_len(int mask)
 {
     int len = 32;
+    if (mask == 0)
+       return 0;
     while ((mask & 1) == 0) {
        len--;
        mask >>= 1;