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

Allocate 6 bytes to copy MAC addresses when unmarshalling ethernet ma… #46

Closed
wants to merge 1 commit into from

Conversation

shi0rik0
Copy link

…tch fields

Currently we are trying to unmarshal data to an uninitialized struct whose net.HardwareAddr fields are set to nil. In this case the copy() function silently does nothing.

Initialize the fields to slices of bytes of length 6 before copying data to them.

This commit is derived from #30.

…tch fields

Currently we are trying to unmarshal data to an uninitialized struct whose
net.HardwareAddr fields are set to nil. In this case the copy() function
silently does nothing.

Initialize the fields to slices of bytes of length 6 before copying data to them.

This commit is derived from antrea-io#30.

Signed-off-by: shi0rik0 <[email protected]>
@shi0rik0 shi0rik0 closed this Mar 13, 2024
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.

1 participant