mirror of
https://github.com/nginx/nginx.git
synced 2024-12-19 21:53:31 -06:00
SSL: added explicit check for ngx_strlchr() result.
This commit is contained in:
parent
f79908af6e
commit
0fd4f76e68
@ -2637,6 +2637,11 @@ ngx_ssl_check_name(ngx_str_t *name, ASN1_STRING *pattern)
|
|||||||
|
|
||||||
end = s + slen;
|
end = s + slen;
|
||||||
s = ngx_strlchr(s, end, '.');
|
s = ngx_strlchr(s, end, '.');
|
||||||
|
|
||||||
|
if (s == NULL) {
|
||||||
|
return NGX_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
slen = end - s;
|
slen = end - s;
|
||||||
|
|
||||||
if (plen == slen && ngx_strncasecmp(s, p, plen) == 0) {
|
if (plen == slen && ngx_strncasecmp(s, p, plen) == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user