diff --git a/src/modsecurity.cc b/src/modsecurity.cc index 1d023e84b..0dda5cf76 100644 --- a/src/modsecurity.cc +++ b/src/modsecurity.cc @@ -262,8 +262,10 @@ int ModSecurity::processContentOffset(const char *content, size_t len, std::string value; yajl_gen_map_open(g); vars.pop_back(); + // cppcheck-suppress redundantCopyLocalConst ; copy required to avoid use after free, see commit 7cb67b0 const std::string startingAt = vars.back().str(); vars.pop_back(); + // cppcheck-suppress redundantCopyLocalConst ; copy required to avoid use after free, see commit 7cb67b0 const std::string size = vars.back().str(); vars.pop_back(); yajl_gen_string(g, @@ -346,8 +348,10 @@ int ModSecurity::processContentOffset(const char *content, size_t len, strlen("highlight")); yajl_gen_map_open(g); ops.pop_back(); + // cppcheck-suppress redundantCopyLocalConst ; copy required to avoid use after free, see commit 7cb67b0 const std::string startingAt = ops.back().str(); ops.pop_back(); + // cppcheck-suppress redundantCopyLocalConst ; copy required to avoid use after free, see commit 7cb67b0 const std::string size = ops.back().str(); ops.pop_back(); yajl_gen_string(g,