At present only PGP packet versions up to 4 are supported. There's no
indication version 5+ will be backwards compatible, so if we see
anything higher it indicates something unsupported. Fixes some issues
found using American Fuzzy Lop.
} else {
rc = ONAK_E_INVALID_PKT;
}
+ if (rc == ONAK_E_OK) {
+ /* Make sure the packet version is sane */
+ if (curpacket->packet->data[0] > 4) {
+ rc = ONAK_E_INVALID_PKT;
+ }
+ }
}
if (packetend != NULL) {