mirror of
https://github.com/nginx/nginx.git
synced 2026-10-25 13:32:27 +00:00
SSL: added explicit check for ngx_strlchr() result.
This commit is contained in:
parent
f79908af6e
commit
0fd4f76e68
1 changed files with 5 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue