Skip to content

Commit

Permalink
fix(app_actions): base_syscalls check for empty string
Browse files Browse the repository at this point in the history
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
  • Loading branch information
incertum authored and poiana committed Feb 24, 2023
1 parent 58dc60e commit 0de9af9
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions userspace/falco/app/actions/helpers_interesting_sets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@ void extract_base_syscalls_names(const std::unordered_set<std::string>& base_sys
{
for (const std::string &ev : base_syscalls_names)
{
if(ev.at(0) == '!')
if (!ev.empty())
{
negative_names.insert(ev.substr(1, ev.size()));
}
else
{
positive_names.insert(ev);
if (ev.at(0) == '!')
{
negative_names.insert(ev.substr(1, ev.size()));
}
else
{
positive_names.insert(ev);
}
}
}
}
Expand Down

0 comments on commit 0de9af9

Please sign in to comment.