SSL: added explicit check for ngx_strlchr() result.

This commit is contained in:
Maxim Dounin 2014-04-22 14:02:45 +04:00
parent f79908af6e
commit 0fd4f76e68

View File

@ -2637,6 +2637,11 @@ ngx_ssl_check_name(ngx_str_t *name, ASN1_STRING *pattern)
end = s + slen;
s = ngx_strlchr(s, end, '.');
if (s == NULL) {
return NGX_ERROR;
}
slen = end - s;
if (plen == slen && ngx_strncasecmp(s, p, plen) == 0) {