Skip to content

Commit

Permalink
Ignore USB packets with usb_data_header->wpan_len less than 5 bytes. #7
Browse files Browse the repository at this point in the history
  • Loading branch information
homewsn committed Mar 9, 2020
1 parent 6543728 commit 610062b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/whsniff.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ static int packet_handler(unsigned char *buf, int cnt)
if (usb_data_header->wpan_len + sizeof(usb_data_header_type) > cnt)
return -1;

if (usb_data_header->wpan_len < 5)
{
break;
}

// SmartRF™ Packet Sniffer User’s Manual (SWRU187G)
// Timestamp:
// 64 bit counter value. To calculate the time in microseconds this value must be divided by a number
Expand Down

0 comments on commit 610062b

Please sign in to comment.