From: wessels <> Date: Fri, 3 Nov 2000 23:43:58 +0000 (+0000) Subject: DW: X-Git-Tag: SQUID_3_0_PRE1~1788 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a60011f4b34458594d7f948d8acb6e0d27276020;p=thirdparty%2Fsquid.git DW: - If we discover a truncated packetin the middle of unpacking a resource record, we need to zap RR fields that were already unpacked. Otherwise we can end up with RR->class = RFC1035_CLASS_IN, RR->type = RFC1035_TYPE_A, and RR->rdlenght = 0. --- diff --git a/lib/rfc1035.c b/lib/rfc1035.c index 37af47c66c..ab652e1bae 100644 --- a/lib/rfc1035.c +++ b/lib/rfc1035.c @@ -1,6 +1,6 @@ /* - * $Id: rfc1035.c,v 1.18 2000/09/14 15:41:03 wessels Exp $ + * $Id: rfc1035.c,v 1.19 2000/11/03 16:43:58 wessels Exp $ * * Low level DNS protocol routines * AUTHOR: Duane Wessels @@ -341,6 +341,7 @@ rfc1035RRUnpack(const char *buf, size_t sz, off_t off, rfc1035_rr * RR) * replies at 512 octets, as per RFC 1035. Returning sz+1 * should cause no further processing for this reply. */ + memset(RR, '\0', sizeof(*RR)); return sz + 1; } switch (RR->type) {