diff --git a/common/src/intercept_policy.cpp b/common/src/intercept_policy.cpp index 4a7c38c..4745c50 100644 --- a/common/src/intercept_policy.cpp +++ b/common/src/intercept_policy.cpp @@ -51,12 +51,15 @@ static void intercept_param_new_cb(const char *table_name, int table_id, const c TFE_LOG_ERROR(enforcer->logger, "Invalid intercept action: %s", table_line); goto error_out; } - - if (maat_helper_read_column(table_line, 5, &do_log, &len) < 0) + + if (maat_helper_read_column(table_line, 5, &offset, &len) < 0) { TFE_LOG_ERROR(enforcer->logger, "Invalid do log: %s", table_line); goto error_out; } + memset(buffer, 0, sizeof(buffer)); + memcpy(buffer, table_line + offset, MIN(sizeof(buffer), len)); + do_log = atoi(buffer); if (maat_helper_read_column(table_line, 7, &offset, &len) < 0) {