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

[nrf fromtree] Bluetooth: add missing initilization of sync_info member #1568

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

ivaniushkov
Copy link
Contributor

During manual testing with UBSAN enabled, it was found that bt_le_per_adv_sync_cb synced() callback in application sometimes gets unexpected different values in
sync_info.recv_enabled field.

The UBSAN output contained the following warnings message: runtime error:
load of value 65, which is not a valid value for type '_Bool'

It tunrned out that struct bt_le_per_adv_sync_synced_info sync_info inside bt_hci_le_past_received_common() contains uninitialized recv_enabled member.
Set it to true by default to avoid possible issues.

(cherry picked from commit 76050859d41d031b78b737ef41640e1fb77f686a)

During manual testing with UBSAN enabled, it was found that
bt_le_per_adv_sync_cb synced() callback in application
sometimes gets unexpected different values in
`sync_info.recv_enabled` field.

The UBSAN output contained the following warnings message:
runtime error:
load of value 65, which is not a valid value for type '_Bool'

It tunrned out that struct bt_le_per_adv_sync_synced_info sync_info
inside bt_hci_le_past_received_common() contains uninitialized
recv_enabled member.
Set it to true by default to avoid possible issues.

Signed-off-by: Ivan Iushkov <[email protected]>
(cherry picked from commit 76050859d41d031b78b737ef41640e1fb77f686a)
Signed-off-by: Ivan Iushkov <[email protected]>
@ivaniushkov ivaniushkov force-pushed the fix_ubsan_warnings_past_scan branch from fdfedd3 to f099bb1 Compare March 11, 2024 07:42
@nordicjm nordicjm merged commit daefd69 into nrfconnect:main Mar 14, 2024
9 checks passed
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.

6 participants