Skip to content

Commit

Permalink
Partially introduced commit b6ed127 to address redundantCopyLocalCons…
Browse files Browse the repository at this point in the history
…t warnings
  • Loading branch information
eduar-hte committed May 3, 2024
1 parent b38caee commit b0f7017
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/modsecurity.cc
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,11 @@ int ModSecurity::processContentOffset(const char *content, size_t len,
strlen("highlight"));
yajl_gen_map_open(g);
ops.pop_back();
std::string startingAt = ops.back().str();
// cppcheck-suppress redundantCopyLocalConst ; copy required to avoid use after free, see commit 7cb67b0
const std::string startingAt = ops.back().str();
ops.pop_back();
std::string size = ops.back().str();
// 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,
reinterpret_cast<const unsigned char*>("startingAt"),
Expand Down

0 comments on commit b0f7017

Please sign in to comment.