Skip to content

Commit

Permalink
Merge pull request #726 from NaivEPoi/master
Browse files Browse the repository at this point in the history
Add check for empty NAS PDU
  • Loading branch information
aligungr authored Aug 27, 2024
2 parents 2134f6b + e0c9bbc commit 528061f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ue/nas/mm/sap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ void NasMm::handleRrcEvent(const NmUeRrcToNas &msg)
break;
}
case NmUeRrcToNas::NAS_DELIVERY: {
if (msg.nasPdu.length() == 0)
{
m_logger->err("Empty NAS PDU received, ignore it");
break;
}
OctetView buffer{msg.nasPdu};
auto nasMessage = nas::DecodeNasMessage(buffer);
if (nasMessage != nullptr)
Expand Down

0 comments on commit 528061f

Please # to comment.