Fix all domains being mangled

This commit is contained in:
Vadim Vetrov 2024-08-08 20:26:35 +03:00
parent 8e3fa48510
commit 0d43ce60f5
No known key found for this signature in database
GPG Key ID: E8A308689D7A73A5

View File

@ -409,10 +409,11 @@ struct verdict analyze_tls_data(
unsigned int j = 0;
for (unsigned int i = 0; i <= config.domains_strlen; i++) {
if ( i == config.domains_strlen ||
if ( i > j &&
(i == config.domains_strlen ||
config.domains_str[i] == '\0' ||
config.domains_str[i] == ',' ||
config.domains_str[i] == '\n' ) {
config.domains_str[i] == '\n' )) {
unsigned int domain_len = (i - j);
const char *sni_startp = sni_name + sni_len - domain_len;