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

prog, map: add nil checks for value marshaller #1609

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

aibor
Copy link
Contributor

@aibor aibor commented Nov 11, 2024

In case of programs or maps as map value types, the value marshalling results in a panic in case of a nil pointer. For other types this is not a problem since sysenc.Marshal does a nil check.

This commit adds a nil check to the internal helper for marshalling programs and maps.

@aibor aibor requested a review from a team as a code owner November 11, 2024 21:15
In case of programs or maps as map value types, the value marshaling
results in a panic in case of a nil pointer. For other types this is not a
problem since sysenc.Marshal does a nil check.

This commit adds a nil check to the internal helper for marshaling
programs and maps.

Signed-off-by: Tobias Böhm <[email protected]>
@ti-mo ti-mo merged commit ddcaa8c into cilium:main Nov 12, 2024
17 checks passed
@ti-mo
Copy link
Collaborator

ti-mo commented Nov 12, 2024

Thanks! Pushed a small fixup.

@aibor
Copy link
Contributor Author

aibor commented Nov 12, 2024

Great, thanks for the quick fixup and merge.

@aibor aibor deleted the marshal-nil-checks branch November 13, 2024 19:55
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.

2 participants