mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Do not allow NULL terminators in the middle of alt name for pattern matching. ZD 17987
This commit is contained in:
@ -12386,6 +12386,8 @@ int MatchDomainName(const char* pattern, int len, const char* str)
|
|||||||
while (--len > 0) {
|
while (--len > 0) {
|
||||||
p = (char)XTOLOWER((unsigned char)*pattern);
|
p = (char)XTOLOWER((unsigned char)*pattern);
|
||||||
pattern++;
|
pattern++;
|
||||||
|
if (p == '\0' && len > 0)
|
||||||
|
return 0;
|
||||||
if (p != '*')
|
if (p != '*')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user