diff options
-rw-r--r-- | src/core/ngx_hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/ngx_hash.c b/src/core/ngx_hash.c index 0c7285202..74d89b8b9 100644 --- a/src/core/ngx_hash.c +++ b/src/core/ngx_hash.c @@ -277,7 +277,7 @@ ngx_hash_init(ngx_hash_init_t *hinit, ngx_hash_key_t *names, ngx_uint_t nelts) start = nelts / (bucket_size / (2 * sizeof(void *))); start = start ? start : 1; - if (hinit->max_size > 10000 && hinit->max_size / nelts < 100) { + if (hinit->max_size > 10000 && nelts && hinit->max_size / nelts < 100) { start = hinit->max_size - 1000; } |