Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential race condition leading to nil dereference #105

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

sthelen-enqs
Copy link
Contributor

Split ApproveOrDeny*Limit public functions into a public part which takes a msgCounter and resolves it to a Message using the pendingLimits as before and a private part which takes a *Message and can be called directly from the internal WriteApprovalCallbacks. This removes the need to call FeatureLocalInterface.ApproveOrDenyWrite with an "empty" message when a message is not found in the pendingLimits for ApprovalRequests that don't match the current use case.

Fixes #104

Split ApproveOrDeny*Limit public functions into a public part which
takes a msgCounter and resolves it to a Message using the pendingLimits
as before and a private part which takes a *Message and can be called
directly from the internal WriteApprovalCallbacks. This removes the need
to call FeatureLocalInterface.ApproveOrDenyWrite with an "empty" message
when a message is not found in the pendingLimits for ApprovalRequests
that don't match the current use case.

Fixes enbility#104
@DerAndereAndi
Copy link
Member

Thanks a lot for the great bug report and PR!

@DerAndereAndi DerAndereAndi merged commit bbc6418 into enbility:dev Aug 27, 2024
4 checks passed
@sthelen-enqs sthelen-enqs deleted the push-uooqprxtvouq branch August 29, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential RaceCondition in CS-LPC and CS-LPP in WriteApprovalCallbacks
2 participants