handle early termination of ad struct

pull/11216/head
paul-szczepanek-arm 2019-08-13 14:49:18 +01:00
parent f8dc035ae4
commit 8acd127640
1 changed files with 5 additions and 0 deletions

View File

@ -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;