Skip to content

Commit

Permalink
Handle exception of getLdapOperationAsn1Record() in `getLdapOperati…
Browse files Browse the repository at this point in the history
…onType()` (#1617)
  • Loading branch information
1ndahous3 authored Oct 23, 2024
1 parent 22f48d2 commit d3adb80
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Packet++/src/LdapLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,17 @@ namespace pcpp

LdapOperationType LdapLayer::getLdapOperationType() const
{
return LdapOperationType::fromUintValue(getLdapOperationAsn1Record()->getTagType());
uint8_t tagType;
try
{
tagType = getLdapOperationAsn1Record()->getTagType();
}
catch (...)
{
tagType = LdapOperationType::Unknown;
}

return LdapOperationType::fromUintValue(tagType);
}

void LdapLayer::parseNextLayer()
Expand Down
Binary file not shown.

0 comments on commit d3adb80

Please sign in to comment.