]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: clang-tidy 15029/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 10 Jan 2025 11:51:15 +0000 (12:51 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 10 Jan 2025 14:22:22 +0000 (15:22 +0100)
pdns/dnsdistdist/dnsdist-lua-ffi.cc
pdns/dnsdistdist/doh3.cc

index 39cd0bc9afdbba9cf1b427c1c3f95e6bc926256e..12f901acf5364ea9bc22d2a1b565d8e842b5fc23 100644 (file)
@@ -501,6 +501,7 @@ void dnsdist_ffi_dnsquestion_set_http_response(dnsdist_ffi_dnsquestion_t* dq, ui
 {
 #if defined(HAVE_DNS_OVER_HTTPS)
   if (dq->dq->ids.du) {
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic): C API
     PacketBuffer bodyVect(body, body + bodyLen);
     dq->dq->ids.du->setHTTPResponse(statusCode, std::move(bodyVect), contentType);
     dnsdist::PacketMangling::editDNSHeaderFromPacket(dq->dq->getMutableData(), [](dnsheader& header) {
@@ -511,6 +512,7 @@ void dnsdist_ffi_dnsquestion_set_http_response(dnsdist_ffi_dnsquestion_t* dq, ui
 #endif
 #if defined(HAVE_DNS_OVER_HTTP3)
   if (dq->dq->ids.doh3u) {
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic): C API
     PacketBuffer bodyVect(body, body + bodyLen);
     dq->dq->ids.doh3u->setHTTPResponse(statusCode, std::move(bodyVect), contentType);
     dnsdist::PacketMangling::editDNSHeaderFromPacket(dq->dq->getMutableData(), [](dnsheader& header) {
index e8fc84b4968d7d9c015d1aa9c598b8549e7fb2c2..6ee0db58b994231e2171aea01172c3292b1d4a57 100644 (file)
@@ -315,6 +315,7 @@ static void h3_send_response(H3Connection& conn, const uint64_t streamID, uint16
     addHeaderToList(headers, "content-type", sizeof("content-type") - 1, s_redirectContentType.data(), s_redirectContentType.size());
     responseBody.reserve(s_redirectStart.size() + len + s_redirectEnd.size());
     responseBody.insert(responseBody.begin(), s_redirectStart.begin(), s_redirectStart.end());
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
     responseBody.insert(responseBody.end(), body, body + len);
     responseBody.insert(responseBody.end(), s_redirectEnd.begin(), s_redirectEnd.end());
     body = responseBody.data();