diff --git a/Packet++/src/GreLayer.cpp b/Packet++/src/GreLayer.cpp index da8b5d717..ff1000cc2 100644 --- a/Packet++/src/GreLayer.cpp +++ b/Packet++/src/GreLayer.cpp @@ -590,6 +590,11 @@ namespace pcpp void PPP_PPTPLayer::computeCalculateFields() { + if (m_DataLen < sizeof(ppp_pptp_header)) + { + PCPP_LOG_ERROR("Insufficient data length for PPP_PPTP header"); + return; + } ppp_pptp_header* header = getPPP_PPTPHeader(); if (m_NextLayer != nullptr) {