]> git.ipfire.org Git - thirdparty/suricata.git/commit
pcap-log: use correct pkthdr size for limit enforcement
authorVictor Julien <vjulien@oisf.net>
Tue, 21 May 2024 12:13:11 +0000 (14:13 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 22 May 2024 18:18:57 +0000 (20:18 +0200)
commit6c937a9243af3423d6934439fee5df93792aa1bb
tree92a85bcf4bc5ba8cfa0a28d659b50ae018432600
parent9b980b18a8498af20dce087d0e7da694ade44393
pcap-log: use correct pkthdr size for limit enforcement

The on-disk pcap pkthdr is 16 bytes. This was calculated using
`sizeof(struct pcap_pkthdr)`, which is 24 bytes on 64 bit Linux. On
Macos, it's even worse, as a comment field grows the struct to 280
bytes.

Address this by hardcoding the value of 16.

Bug: #7037.
src/log-pcap.c