From 662ae6da6ba7ca43c5efe3feda5ec04f50d52070 Mon Sep 17 00:00:00 2001 From: Yichun Zhang Date: Thu, 2 Oct 2014 12:00:17 -0700 Subject: Core: fixed buffer overrun when hash max_size reached. --- src/core/ngx_hash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/ngx_hash.c b/src/core/ngx_hash.c index c7bfed709..65ad83947 100644 --- a/src/core/ngx_hash.c +++ b/src/core/ngx_hash.c @@ -312,6 +312,8 @@ ngx_hash_init(ngx_hash_init_t *hinit, ngx_hash_key_t *names, ngx_uint_t nelts) continue; } + size--; + ngx_log_error(NGX_LOG_WARN, hinit->pool->log, 0, "could not build optimal %s, you should increase " "either %s_max_size: %i or %s_bucket_size: %i; " -- cgit v1.2.1