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 overflow warning #204

Merged

Conversation

PartialVolume
Copy link
Collaborator

@martijnvanbrummelen Use sizeof to determine the size of the character array that we construct the dmidecode command in.

This is a better way to determine the array size as it's determined by the compiler. It also means that if the dmidecode keyword is added to the destination array size is automatically adjusted by the compiler.

Use sizeof to determine suitable string size for the dmidecode cmd buffer
@PartialVolume PartialVolume merged commit e2ec6a5 into martijnvanbrummelen:master Mar 10, 2020
@PartialVolume PartialVolume deleted the fix_overflow_warning branch March 10, 2020 15:39
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