Skip to content

Conversation

@SrivastavaOm29
Copy link

Fix validation of AD length handling in the Bluetooth shell. Reject zero-length AD fields before subtracting the AD type size.

The previous implementation compared an unsigned length against zero after subtraction, making the error path unreachable.

Fixes #99979

Fix validation of AD length handling in the Bluetooth shell.
Reject zero-length AD fields before subtracting the AD type size.

The previous implementation compared an unsigned length
against zero after subtraction, making the error path
unreachable.

Signed-off-by: Om Srivastava <[email protected]>
@github-actions
Copy link

Hello @SrivastavaOm29, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Bluetooth Host Bluetooth Host (excluding BR/EDR) area: Bluetooth

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Coverity CID: 434615] Unsigned compared against 0 in subsys/bluetooth/host/shell/bt.c

4 participants