From: hno <> Date: Mon, 9 May 2005 08:09:16 +0000 (+0000) Subject: Make DNS parser more forgiving, allowing for gaps in the domainname X-Git-Tag: SQUID_3_0_PRE4~763 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=914eac3d5c5615abeb86f9d2dab60fe819cad722;p=thirdparty%2Fsquid.git Make DNS parser more forgiving, allowing for gaps in the domainname rddata. --- diff --git a/lib/rfc1035.c b/lib/rfc1035.c index 8ff1e36208..b75dad74f2 100644 --- a/lib/rfc1035.c +++ b/lib/rfc1035.c @@ -1,6 +1,6 @@ /* - * $Id: rfc1035.c,v 1.39 2005/05/09 01:59:26 hno Exp $ + * $Id: rfc1035.c,v 1.40 2005/05/09 02:09:16 hno Exp $ * * Low level DNS protocol routines * AUTHOR: Duane Wessels @@ -410,7 +410,7 @@ rfc1035RRUnpack(const char *buf, size_t sz, off_t * off, rfc1035_rr * RR) RR->rdlength = 0; /* Filled in by rfc1035NameUnpack */ if (rfc1035NameUnpack(buf, sz, &rdata_off, &RR->rdlength, RR->rdata, RFC1035_MAXHOSTNAMESZ, 0)) return 1; - if (rdata_off != ((*off) + rdlength)) { + if (rdata_off > ((*off) + rdlength)) { /* * This probably doesn't happen for valid packets, but * I want to make sure that NameUnpack doesn't go beyond