From: wessels <> Date: Wed, 8 Nov 2000 06:43:15 +0000 (+0000) Subject: Radu Greab (radu@netsoft.ro): X-Git-Tag: SQUID_3_0_PRE1~1783 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=954568bfc0c2ff39ba3a29508d5cb6875ff77bac;p=thirdparty%2Fsquid.git Radu Greab (radu@netsoft.ro): - 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. --- diff --git a/src/asn.cc b/src/asn.cc index da67343ec9..54d3f3a0f0 100644 --- a/src/asn.cc +++ b/src/asn.cc @@ -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;