mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-12 15:23:41 -05:00
- Fix dname_has_label() code review changes
This commit is contained in:
parent
ae4f6a259b
commit
2abaca7a49
1 changed files with 7 additions and 3 deletions
|
|
@ -549,9 +549,13 @@ dname_lab_startswith(uint8_t* label, char* prefix, char** endptr)
|
|||
int
|
||||
dname_has_label(uint8_t* dname, uint8_t* label)
|
||||
{
|
||||
uint8_t lablen = *dname++;
|
||||
if(memlowercmp(dname, label, lablen) == 0)
|
||||
return 1;
|
||||
uint8_t lablen = *dname;
|
||||
while(lablen) {
|
||||
if(lablen == *label && memlowercmp(dname, label, lablen) == 0)
|
||||
return 1;
|
||||
dname += lablen;
|
||||
lablen = *dname;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue