diff --git a/ldap/ldap.go b/ldap/ldap.go index 2067cae..32cbef8 100644 --- a/ldap/ldap.go +++ b/ldap/ldap.go @@ -45,7 +45,7 @@ func (l *LDAPMatcher) Match(info osm.MatchInfo, index int, packet *osm.Packet) e } p := ber.DecodePacket(packet.Buffer) - if nil == p.Children || len(p.Children) <= 1 { + if nil == p || nil == p.Children || len(p.Children) <= 1 { return osm.NotMatchedError() }