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

printload: fix buffer overflow on NuttX #8884

Merged
merged 1 commit into from
Feb 14, 2018
Merged

printload: fix buffer overflow on NuttX #8884

merged 1 commit into from
Feb 14, 2018

Conversation

bkueng
Copy link
Member

@bkueng bkueng commented Feb 14, 2018

The NuttX config variable CONFIG_TASK_NAME_SIZE does not include the
null terminator byte, thus the buffer needs to be longer by 1 byte.

We have CONFIG_TASK_NAME_SIZE set to 24 and most of the task names are shorter than that, so we did not notice. Except for landing_target_estimator, which lead to random bytes being printed when it was running.
This then lead to invalid strings in the log file, since the output of printload is logged.

Fixes #8877

The NuttX config variable CONFIG_TASK_NAME_SIZE does not include the
null terminator byte, thus the buffer needs to be longer by 1 byte.
@LorenzMeier
Copy link
Member

Awesome!

@LorenzMeier LorenzMeier merged commit 2517d38 into master Feb 14, 2018
@LorenzMeier LorenzMeier deleted the fix_printload branch February 14, 2018 10:17
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