RFC6125 does not specify if wildcard matches empty strings but
classical browsers implementations does.
After the fix foo*bar.exemple.om matches foobar.exemple.com.
/* Make sure the leftmost label of the hostname is long enough
* that the wildcard can match */
- if (hostname_left_label_end - hostname < pattern_left_label_end - pattern)
+ if (hostname_left_label_end - hostname < (pattern_left_label_end - pattern) - 1)
return 0;
/* Finally compare the string on either side of the