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

memset zeros entire buffer in netlink oops #1

Merged
merged 1 commit into from Jan 3, 2020

Conversation

@Hamled
Copy link
Contributor

Hamled commented Jan 3, 2020

Haven't reviewed the code enough to know if this would have been an actual issue, but clang warned me about it when I did make all so I figured I'd send a PR.

@bcoles bcoles merged commit 978df37 into bcoles:master Jan 3, 2020
@bcoles

This comment has been minimized.

Copy link
Owner

bcoles commented Jan 3, 2020

Thanks

Haven't reviewed the code enough to know if this would have been an actual issue

It wouldn't. buf[64] is defined on the previous line.

@Hamled Hamled deleted the Hamled:oops-netlink-memset branch Jan 3, 2020
@Hamled

This comment has been minimized.

Copy link
Contributor Author

Hamled commented Jan 3, 2020

I was thinking that since buf was an array of int, and the memset was only zeroing 64 bytes, the original wouldn't end up zeroing out the entire array.

@bcoles

This comment has been minimized.

Copy link
Owner

bcoles commented Jan 3, 2020

I was thinking that since buf was an array of int, and the memset was only zeroing 64 bytes, the original wouldn't end up zeroing out the entire array.

Fair call. You're correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.