Fixes from american fuzzy lop testing.

This commit is contained in:
Ian Gulliver
2016-02-26 13:56:52 -08:00
parent 8d9a11076b
commit 9f5ad1518a
2 changed files with 7 additions and 1 deletions

View File

@@ -75,7 +75,10 @@ static bool proto_parse_header(AdsbHeader *header, struct packet *packet, struct
return false;
}
if (header->mlat_timestamp_mhz > UINT16_MAX) {
if (!header->mlat_timestamp_mhz ||
header->mlat_timestamp_mhz > UINT16_MAX ||
!header->mlat_timestamp_max ||
!header->rssi_max) {
return false;
}
state->mlat_timestamp_mhz = (uint16_t) header->mlat_timestamp_mhz;