]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/nsecrecords.cc
dnsdist: Add HTTPStatusAction to return a specific HTTP response
[thirdparty/pdns.git] / pdns / nsecrecords.cc
index 25132682e33b5eb02b1487f48bdfd12549ed1656..21e6d13da1ce9eacf83f80b6515a895229e39072 100644 (file)
@@ -29,7 +29,9 @@ class NSECBitmapGenerator
 public:
   NSECBitmapGenerator(DNSPacketWriter& pw_): pw(pw_)
   {
+    memset(res, 0, sizeof(res));
   }
+
   void set(uint16_t type)
   {
     uint16_t bit = type % 256;
@@ -42,7 +44,7 @@ public:
         tmp.assign(res, res+len+2);
         pw.xfrBlob(tmp);
       }
-      memset(res, 0, 34);
+      memset(res, 0, sizeof(res));
       oldWindow = window;
     }
     res[2+bit/8] |= 1 << (7-(bit%8));