fix: enforce const-correctness in indexed_vector#3736
fix: enforce const-correctness in indexed_vector#3736vietcgi wants to merge 1 commit intofalcosecurity:masterfrom
Conversation
Signed-off-by: Kevin Vu <[email protected]>
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: vietcgi The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
This PR may bring feature or behavior changes in the Falco engine and may require the engine version to be bumped. Please double check userspace/engine/falco_engine_version.h file. See versioning for FALCO_ENGINE_VERSION. /hold |
Problem
Const
at()methods were returning mutable pointers via const_cast, violating const-correctness.Solution
at()methods into const/non-const overloadsconst T*, non-const returnsT*Changes
indexed_vector.h: Added const/non-const overloads for bothat()methodsrule_loader_compiler.cpp: Updated helper functions to return const pointersVerified compilation and all call sites handle const-correctness properly.