mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-24 06:52:37 +01:00
monitor: Skip packet from PCAP file if it is truncated
This commit is contained in:
parent
b00bea15ab
commit
581f00171d
@ -170,8 +170,10 @@ static int process_pcap(struct pcap *pcap)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (len < real_len)
|
||||
if (len < real_len) {
|
||||
printf("Packet truncated from %u\n", real_len);
|
||||
continue;
|
||||
}
|
||||
|
||||
pkt_type = L_GET_UNALIGNED((const uint16_t *) buf);
|
||||
pkt_type = L_BE16_TO_CPU(pkt_type);
|
||||
|
Loading…
Reference in New Issue
Block a user