diff --git a/userspace/falco/app/actions/helpers_interesting_sets.cpp b/userspace/falco/app/actions/helpers_interesting_sets.cpp index 9e089f68..1f9ce1b4 100644 --- a/userspace/falco/app/actions/helpers_interesting_sets.cpp +++ b/userspace/falco/app/actions/helpers_interesting_sets.cpp @@ -23,13 +23,16 @@ void extract_base_syscalls_names(const std::unordered_set& 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); + } } } }