mirror of
https://github.com/nginx/nginx.git
synced 2025-06-11 04:12:40 +08:00
fix segfault in IPv6 parsing while processing invalid IPv4 address X.YYYY.Z
patch by Maxim Dounin
This commit is contained in:
parent
14fe2dd94a
commit
9813a1999c
@ -110,7 +110,7 @@ ngx_inet6_addr(u_char *p, size_t len, u_char *addr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (c == '.' && nibbles) {
|
if (c == '.' && nibbles) {
|
||||||
if (n < 2) {
|
if (n < 2 || digit == NULL) {
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user