Skip to content

Bluetooth: settings: Fix missing log_strdup() call #13612

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

Merged
merged 1 commit into from
Feb 21, 2019

Conversation

jhedberg
Copy link
Member

The bt_settings_encode_key() cannot know if the given path pointer is
on the stack or not, so the only safe way to pass it to the logger is
by using a log_strdup() call. Not doing this will likely cause
corrupted strings to show up in the log output.

Signed-off-by: Johan Hedberg [email protected]

The bt_settings_encode_key() cannot know if the given path pointer is
on the stack or not, so the only safe way to pass it to the logger is
by using a log_strdup() call. Not doing this will likely cause
corrupted strings to show up in the log output.

Signed-off-by: Johan Hedberg <[email protected]>
@codecov-io
Copy link

Codecov Report

Merging #13612 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13612      +/-   ##
==========================================
- Coverage   52.45%   52.45%   -0.01%     
==========================================
  Files         322      322              
  Lines       46592    46592              
  Branches    10768    10768              
==========================================
- Hits        24442    24441       -1     
  Misses      17247    17247              
- Partials     4903     4904       +1
Impacted Files Coverage Δ
arch/posix/core/posix_core.c 90.9% <0%> (-1.02%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 794d382...3806b6a. Read the comment docs.

@jhedberg jhedberg merged commit 16311e2 into zephyrproject-rtos:master Feb 21, 2019
@jhedberg jhedberg deleted the settings_log_strdup branch February 21, 2019 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants