commit | 9813a1999c0297210785c064ea2a02a064d58900 | [log] [tgz] |
---|---|---|
author | Igor Sysoev <igor@sysoev.ru> | Fri Apr 15 13:50:27 2011 +0000 |
committer | Igor Sysoev <igor@sysoev.ru> | Fri Apr 15 13:50:27 2011 +0000 |
tree | 154e8a97acafae07cc5fbc9a7c1bfbe1bd9ec8f1 | |
parent | 14fe2dd94a1c0605f73e7a909738aa247ae21fa6 [diff] [blame] |
fix segfault in IPv6 parsing while processing invalid IPv4 address X.YYYY.Z patch by Maxim Dounin
diff --git a/src/core/ngx_inet.c b/src/core/ngx_inet.c index 7440c28..ac1ca8b 100644 --- a/src/core/ngx_inet.c +++ b/src/core/ngx_inet.c
@@ -110,7 +110,7 @@ } if (c == '.' && nibbles) { - if (n < 2) { + if (n < 2 || digit == NULL) { return NGX_ERROR; }