Skip to content

Commit 215f811

Browse files
committed
Merge branch 'pr-220'
2 parents 970718f + 94754c4 commit 215f811

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* https://github.com/arduino-libraries/ArduinoBLE/pull/134
1111
* https://github.com/arduino-libraries/ArduinoBLE/pull/156
1212
* https://github.com/arduino-libraries/ArduinoBLE/pull/183
13+
* https://github.com/arduino-libraries/ArduinoBLE/pull/220
1314
<!-- pull requests -->
1415

1516
You can consider this as an experimental version of the library, that you can use to test features contributed by the community that haven't been merged yet.

src/utility/HCI.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,10 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
11191119
uint8_t eirData[31];
11201120
} *leAdvertisingReport = (EvtLeAdvertisingReport*)&pdata[sizeof(HCIEventHdr) + sizeof(LeMetaEventHeader)];
11211121

1122+
if(leAdvertisingReport->eirLength > sizeof(leAdvertisingReport->eirData)){
1123+
return;
1124+
}
1125+
11221126
if (leAdvertisingReport->status == 0x01) {
11231127
// last byte is RSSI
11241128
int8_t rssi = leAdvertisingReport->eirData[leAdvertisingReport->eirLength];

0 commit comments

Comments
 (0)