From: hno <> Date: Mon, 21 Aug 2006 03:02:53 +0000 (+0000) Subject: Handle very large DNS responses gracefully. X-Git-Tag: SQUID_3_0_PRE5~180 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be6e7af9ce8b132cda588ef331941ccff45f9506;p=thirdparty%2Fsquid.git Handle very large DNS responses gracefully. --- diff --git a/src/ipcache.cc b/src/ipcache.cc index 165da8d183..f337033939 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -1,6 +1,6 @@ /* - * $Id: ipcache.cc,v 1.256 2006/08/07 02:28:22 robertc Exp $ + * $Id: ipcache.cc,v 1.257 2006/08/20 21:02:53 hno Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived @@ -446,7 +446,10 @@ ipcacheParse(ipcache_entry *i, rfc1035_rr * answers, int nr, const char *error_m assert(j == na); - i->addrs.count = (unsigned char) na; + if (na < 256) + i->addrs.count = (unsigned char) na; + else + i->addrs.count = 255; if (ttl == 0 || ttl > Config.positiveDnsTtl) ttl = Config.positiveDnsTtl;