diff --git a/CMakeLists.txt b/CMakeLists.txt index 89f7f6cad72..49b6933ff6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -600,7 +600,7 @@ add_compile_options(-pipe -Wall -Wextra -Wno-unused-parameter) add_compile_options( "$<$:-Wno-noexcept-type;-Wsuggest-override;-Wno-vla-extension;-fno-strict-aliasing>" ) -add_compile_options("$<$:-Wno-format-truncation;-Wno-stringop-overflow>") +add_compile_options("$<$:-Wno-format-truncation>") if(NOT EXTERNAL_YAML_CPP) include(subproject_version) diff --git a/lib/swoc/unit_tests/CMakeLists.txt b/lib/swoc/unit_tests/CMakeLists.txt index bd2fe052696..d3a66ff6156 100644 --- a/lib/swoc/unit_tests/CMakeLists.txt +++ b/lib/swoc/unit_tests/CMakeLists.txt @@ -39,7 +39,6 @@ if(CMAKE_COMPILER_IS_GNUCXX) -Werror -Wno-unused-parameter -Wno-format-truncation - -Wno-stringop-overflow -Wno-invalid-offsetof ) # stop the compiler from complaining about unused variable in structured binding diff --git a/src/iocore/net/OCSPStapling.cc b/src/iocore/net/OCSPStapling.cc index b1cee4eafc9..a9743c7277a 100644 --- a/src/iocore/net/OCSPStapling.cc +++ b/src/iocore/net/OCSPStapling.cc @@ -1169,8 +1169,8 @@ make_url_for_get(TS_OCSP_REQUEST *req, const char *base_url) // Append '/' if base_url does not end with it if (url->buf()[url->size() - 1] != '/') { - strncat(url->end(), "/", 1); - url->fill(1); + written = ink_strlcat(url->end(), "/", url->write_avail()); + url->fill(written); } written = ink_strlcat(url->end(), ocsp_escaped, url->write_avail()); diff --git a/src/iocore/net/UnixUDPNet.cc b/src/iocore/net/UnixUDPNet.cc index 92f44fd0e6d..554031fbe33 100644 --- a/src/iocore/net/UnixUDPNet.cc +++ b/src/iocore/net/UnixUDPNet.cc @@ -97,7 +97,7 @@ UDPPacket::new_UDPPacket(struct sockaddr const *to, ink_hrtime when, Ptrp.segment_size = segment_size; #ifdef HAVE_SO_TXTIME if (send_at_hint) { - memcpy(&p->p.send_at, &send_at_hint, sizeof(struct timespec)); + memcpy(&p->p.send_at, send_at_hint, sizeof(struct timespec)); } #endif return p;