-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
BLEManagerImpl may have MTU overflow its storage #2569
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
@shana-apple amd @vivien-apple are probably more familiar with this. I can look if they're unable. |
|
This looks like platform specific code - re-assigned to platform owner. |
@bzbarsky-apple As per the BLE specification, the maximum MTU value can be 517 bytes. This can be accomodated in 10 bits. Good enough to close this? |
Good enough, but would be even better with a comment. ;) |
Problem
In
src/platform/ESP32/BLEManagerImpl.cpp
we have this line inBLEManagerImpl::HandleGATTCommEvent
:The right-hand side is a
uint16_t
. The left-hand side is a 10-bit bitfield. There seems to be no check that the value on the right will fit on the left, nor any explanation for why a check is not needed.Proposed Solution
Either introduce a check or add an explanation for why it's not needed.
@sagar-apple it looks like you might know something about this code?
The text was updated successfully, but these errors were encountered: