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

Avoid int underflow in BLEWriter::write_value() #91

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

codepainters
Copy link
Contributor

This fixes a panic if write_value() is called on a closed connection. See #90.

Not sure if BLE_HS_ENOTCONN is the best error code to use for such a situation, though.

@taks
Copy link
Owner

taks commented Feb 19, 2024

The ble_gattc_write_no_rsp_flat function (used after ble_att_mtu) returns BLE_HS_ENOTCONN when unconnected.
Therefore, I belive that BLE_HS_ENOTCONN is the best error code.

@taks taks merged commit 8f55ab5 into taks:develop Feb 19, 2024
7 checks passed
@taks taks linked an issue Feb 19, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants