]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
WCCP: fix inverted range check (#1323)
authorAmos Jeffries <yadij@users.noreply.github.com>
Wed, 19 Apr 2023 14:55:13 +0000 (14:55 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 21 Apr 2023 15:08:32 +0000 (15:08 +0000)
Correct a typo in 464223c147a568169e940fb466947bdb556d87af

src/wccp2.cc

index df307dcabc9db3d6c9082e0de4af3738c91433d6..d46a5f826470719331f86a7aea2ca864b4973b62 100644 (file)
@@ -1452,7 +1452,7 @@ wccp2HandleUdp(int sock, void *)
         ptr += sizeof(*routerCountRaw);
         const auto ipCount = ntohl(*routerCountRaw);
         const auto ipsSize = ipCount * sizeof(struct in_addr); // we check for unsigned overflow below
-        Must3(ipsSize / sizeof(struct in_addr) != ipCount, "huge IP address count", Here());
+        Must3(ipsSize / sizeof(struct in_addr) == ipCount, "huge IP address count", Here());
         CheckSectionLength(ptr, ipsSize, router_view_header, router_view_size, "invalid IP address count");
         ptr += ipsSize;