Skip to content

Commit 90ad66d

Browse files
miraclxwez
authored andcommitted
support spaces in rDNS names
1 parent d86a31a commit 90ad66d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/iconv.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -969,9 +969,11 @@ int test_conforming_alpha_string(char *in_string) {
969969
}
970970

971971
while (valid_bytes < string_len) {
972-
if ((*test_str >= 65 && *test_str <= 90) ||
973-
(*test_str >= 97 && *test_str <= 122) || *test_str == 95 ||
974-
(*test_str >= 48 && *test_str <= 57)) {
972+
if ((*test_str >= 65 && *test_str <= 90) // A-Z
973+
|| (*test_str >= 97 && *test_str <= 122) // a-z
974+
|| (*test_str >= 48 && *test_str <= 57) // 0-9
975+
|| *test_str == 32 || *test_str == 95) // space or underscore
976+
{
975977
valid_bytes++;
976978
} else {
977979
break;

0 commit comments

Comments
 (0)