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 error checking for log/param var lengths #287

Merged
merged 1 commit into from
Jan 29, 2018

Conversation

whoenig
Copy link
Contributor

@whoenig whoenig commented Jan 26, 2018

This change fixes undefined runtime behavior in case a developer used variable names for logging that are too long:
1.) The existing checks for both params and logging at startup were incorrect, because they did not look at both group and variable name.
2.) There was no check in logging CMD_GET_ITEM, potentially causing undefined runtime behavior. This change implements the same check as in the parameter framework.

The issue will be detected at startup in all cases. If the debug mode for logging or parameters is enabled, the first variable that violates the condition will be printed.

This change fixes undefined runtime behavior in case a developer used variable names for logging that are too long:
1.) The existing checks for both params and logging at startup were incorrect, because they did not look at both group and variable name.
2.) There was no check in logging CMD_GET_ITEM, potentially causing undefined runtime behavior. This change implements the same check as in the parameter framework.

The issue will be detected at startup in all cases. If the debug mode for logging or parameters is enabled, the first variable that violates the condition will be printed.
@krichardsson
Copy link
Contributor

Thanks!

@krichardsson krichardsson merged commit 843146e into bitcraze:master Jan 29, 2018
@krichardsson krichardsson modified the milestones: Next release, 2018.10 Oct 18, 2018
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