]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
DW:
authorwessels <>
Fri, 3 Nov 2000 23:43:58 +0000 (23:43 +0000)
committerwessels <>
Fri, 3 Nov 2000 23:43:58 +0000 (23:43 +0000)
 - 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.

lib/rfc1035.c

index 37af47c66c207c8f1ba790746d652d8d81f2dcb3..ab652e1bae566940580a863e4b529f9b8eebb2cf 100644 (file)
@@ -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) {