Skip to content

Commit

Permalink
Add dummy code for analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
Anilm3 committed Jan 22, 2025
1 parent c113189 commit bd9e009
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ DDWAF_RET_CODE context::run(optional_ref<ddwaf_object> persistent,
output = DDWAF_RESULT_INITIALISER;
}

{
if (ddwaf::logger::valid(DDWAF_LOG_INFO)) {
constexpr const char *filename = base_name(__FILE__);
auto message = ddwaf::fmt::format("this is a test message");
ddwaf::logger::log(
DDWAF_LOG_INFO, __FUNCTION__, filename, __LINE__, message.c_str(), message.size());
}
}

auto *free_fn = ruleset_->free_fn;
if (persistent.has_value() && !store_.insert(*persistent, attribute::none, free_fn)) {
DDWAF_WARN("Illegal WAF call: parameter structure invalid!");
Expand Down

0 comments on commit bd9e009

Please sign in to comment.