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

EFR32 BLEManagerImpl::ConfigureAdvertisingData assumes the device name is "short enough" #2596

Closed
bzbarsky-apple opened this issue Sep 11, 2020 · 2 comments · Fixed by #4870
Labels
bug Something isn't working p1 priority 1 work

Comments

@bzbarsky-apple
Copy link
Contributor

Problem

Things like strlen(mDeviceName) are being passed as uint8_t. mDeviceNameLength is a uint8_t. mDeviceNameLength + 1 is assumed to fit into a uint8_t.

Proposed Solution

Add an explicit check that the device name is not too long, error out if it is.

@vivien-apple @shana-apple

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.70. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the bug Something isn't working label Sep 11, 2020
@bzbarsky-apple
Copy link
Contributor Author

Also, index + mDeviceNameLength is assumed to fit in uint8_t.

@woody-apple woody-apple added this to the V1.0 milestone Sep 21, 2020
@franck-apple franck-apple added the p2 priority 2 work label Oct 16, 2020
@woody-apple woody-apple added p1 priority 1 work and removed p2 priority 2 work labels Oct 22, 2020
@woody-apple woody-apple modified the milestones: V1.0, Next Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p1 priority 1 work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants