mirror of https://github.com/ARMmbed/mbed-os.git
handle early termination of ad struct
parent
f8dc035ae4
commit
8acd127640
|
|
@ -69,6 +69,11 @@ public:
|
|||
if (position >= data.size()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* early termination of packet, no more meaningful octets */
|
||||
if (current_length() == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (position + current_length() >= data.size()) {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue