]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: Initialize the 'res' array of NSECBitmapGenerator
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 29 May 2019 08:03:05 +0000 (10:03 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 29 May 2019 08:03:05 +0000 (10:03 +0200)
Otherwise coverity wrongly complains that it might be read before
being initialized (CID 1401607).

pdns/nsecrecords.cc

index 25132682e33b5eb02b1487f48bdfd12549ed1656..ce04ddde061adb664a5c6a7c2d1d8bc4014dc7ec 100644 (file)
@@ -29,7 +29,9 @@ class NSECBitmapGenerator
 public:
   NSECBitmapGenerator(DNSPacketWriter& pw_): pw(pw_)
   {
+    memset(res, 0, 34);
   }
+
   void set(uint16_t type)
   {
     uint16_t bit = type % 256;