Skip to content

Commit

Permalink
Bug #571 tcpcapinfo: fail on excessive snaplen
Browse files Browse the repository at this point in the history
  • Loading branch information
fklassen committed Jun 2, 2020
1 parent a416f7c commit 6b84b18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tcpcapinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ main(int argc, char *argv[])
PRIx32".%"PRIx32,
pktcnt, pcap_ph.len, pcap_ph.caplen,
(unsigned int)pcap_ph.ts.tv_sec, (unsigned int)pcap_ph.ts.tv_usec);
if (pcap_fh.snaplen < pcap_ph.caplen) {
if (pcap_fh.snaplen < pcap_ph.caplen || pcap_ph.caplen > MAX_SNAPLEN) {
caplentoobig = 1;
}
caplen = pcap_ph.caplen;
Expand Down

0 comments on commit 6b84b18

Please sign in to comment.