Skip to content

Commit 21df0f9

Browse files
authored
Check at the start of the function
1 parent 3415918 commit 21df0f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Packet++/src/GreLayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,12 +590,12 @@ namespace pcpp
590590

591591
void PPP_PPTPLayer::computeCalculateFields()
592592
{
593-
ppp_pptp_header* header = getPPP_PPTPHeader();
594593
if (m_DataLen < sizeof(ppp_pptp_header))
595594
{
596595
PCPP_LOG_ERROR("Insufficient data length for PPP_PPTP header");
597596
return;
598597
}
598+
ppp_pptp_header* header = getPPP_PPTPHeader();
599599
if (m_NextLayer != nullptr)
600600
{
601601
switch (m_NextLayer->getProtocol())

0 commit comments

Comments
 (0)