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;
             }