Skip to content

Commit 676dfb7

Browse files
committed
Do not allow NULL terminators in the middle of alt name for pattern matching. ZD 17987
1 parent 28bd4eb commit 676dfb7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/internal.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12386,6 +12386,8 @@ int MatchDomainName(const char* pattern, int len, const char* str)
1238612386
while (--len > 0) {
1238712387
p = (char)XTOLOWER((unsigned char)*pattern);
1238812388
pattern++;
12389+
if (p == '\0' && len > 0)
12390+
return 0;
1238912391
if (p != '*')
1239012392
break;
1239112393
}

0 commit comments

Comments
 (0)