From acefbd3cd7ec219071849f7b10239f463140a6da Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Tue, 4 Jun 2019 09:28:50 +0200 Subject: [PATCH] Use sizeof when initializing NSECBitmapGenerator::res --- pdns/nsecrecords.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/nsecrecords.cc b/pdns/nsecrecords.cc index ce04ddde06..21e6d13da1 100644 --- a/pdns/nsecrecords.cc +++ b/pdns/nsecrecords.cc @@ -29,7 +29,7 @@ class NSECBitmapGenerator public: NSECBitmapGenerator(DNSPacketWriter& pw_): pw(pw_) { - memset(res, 0, 34); + memset(res, 0, sizeof(res)); } void set(uint16_t type) @@ -44,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)); -- 2.47.2