fix: domain-set wildcard match

This commit is contained in:
Skyxim
2023-04-26 02:49:16 +00:00
parent e1af1abcc2
commit d8db25ee89
2 changed files with 3 additions and 1 deletions

View File

@ -105,7 +105,7 @@ func (ss *DomainSet) Has(key string) bool {
}
}
for ; ; nextBmIdx++ {
if ss.labels[nextBmIdx-nextNodeId] == domainStepByte {
if nextBmIdx-nextNodeId < len(ss.labels) && ss.labels[nextBmIdx-nextNodeId] == domainStepByte {
bmIdx = nextBmIdx
nodeId = nextNodeId
i = j