Fixed a bug that allowed all procs to be scoped when using the example filter.
@@ -2984,7 +2984,8 @@ static void
processAllowProcCmdLineScalar(yaml_document_t *doc, yaml_node_t *node, filter_cfg_t *fCfg) {
if (node->type != YAML_SCALAR_NODE) return;
- if (scope_strstr(fCfg->procCmdLine, ((const char*) node->data.scalar.value)) != NULL) {
+ if (node->data.scalar.value && (scope_strlen((char *)node->data.scalar.value) > 0) &&
+ scope_strstr(fCfg->procCmdLine, ((const char*) node->data.scalar.value)) != NULL) {
fCfg->status = PROC_ALLOWED;
fCfg->filterMatch = TRUE;
}
