Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Pcap++/src/PcapFileDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ namespace pcpp
return false;
}

uint8_t* pMyPacketData = new uint8_t[pkthdr.caplen];
uint8_t* pMyPacketData = new uint8_t[pkthdr.caplen + 2]; // Allocate extra buffer space for safety
memcpy(pMyPacketData, pPacketData, pkthdr.caplen);
#if defined(PCAP_TSTAMP_PRECISION_NANO)
// because we opened with nano second precision 'tv_usec' is actually nanos
Expand Down
Loading