mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #11216 from paul-szczepanek-arm/fix-ad-parser
BLE: make advertising data parser handle early terminationpull/11264/head
commit
7ee382bdc0
|
@ -69,6 +69,11 @@ public:
|
||||||
if (position >= data.size()) {
|
if (position >= data.size()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* early termination of packet, no more meaningful octets */
|
||||||
|
if (current_length() == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (position + current_length() >= data.size()) {
|
if (position + current_length() >= data.size()) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue