-
Notifications
You must be signed in to change notification settings - Fork 8k
Bluetooth: Host: Check returned value by LE_READ_BUFFER_SIZE
#54905
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
stephanosio
merged 1 commit into
zephyrproject-rtos:main
from
theob-pro:fix-invalid-init-of-le-read-buffer-size-complete
Feb 17, 2023
Merged
Bluetooth: Host: Check returned value by LE_READ_BUFFER_SIZE
#54905
stephanosio
merged 1 commit into
zephyrproject-rtos:main
from
theob-pro:fix-invalid-init-of-le-read-buffer-size-complete
Feb 17, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hci_core.c
LE_READ_BUFFER_SIZE
446b331
to
13b314c
Compare
jhedberg
requested changes
Feb 17, 2023
13b314c
to
a42cbea
Compare
Thalley
requested changes
Feb 17, 2023
775a393
to
6f42f9c
Compare
jhedberg
previously approved these changes
Feb 17, 2023
`rp->le_max_num` was passed unchecked into `k_sem_init()`, this could lead to the value being uninitialized and an unknown behavior. To fix that issue, the `rp->le_max_num` value is checked the same way as `bt_dev.le.acl_mtu` was already checked. The same things has been done for `rp->acl_max_num` and `rp->iso_max_num` in `read_buffer_size_v2_complete()` function. Signed-off-by: Théo Battrel <[email protected]>
6f42f9c
to
e8b9db7
Compare
Thalley
approved these changes
Feb 17, 2023
jori-nordic
approved these changes
Feb 17, 2023
jhedberg
approved these changes
Feb 17, 2023
This was referenced Feb 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
rp->le_max_num
was passed unchecked intok_sem_init()
, this could lead to the value being uninitialized and an unknown behavior.To fix that issue, the
rp->le_max_num
value is checked the same way asbt_dev.le.acl_mtu
was already checked. The same things has been done forrp->acl_max_num
andrp->iso_max_num
inread_buffer_size_v2_complete()
function.