# HG changeset patch # User Igor Sysoev # Date 1277892831 0 # Node ID 3d61601f31714bcabfe324eea21cc7f0fa929801 # Parent ec20f1f93aeacdd164bf255a06b5e7f710e341de test binary geo range base size diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c --- a/src/http/modules/ngx_http_geo_module.c +++ b/src/http/modules/ngx_http_geo_module.c @@ -1232,7 +1232,7 @@ ngx_http_geo_include_binary_base(ngx_con header = (ngx_http_geo_header_t *) base; - if (ngx_memcmp(&ngx_http_geo_header, header, 12) != 0) { + if (size < 16 || ngx_memcmp(&ngx_http_geo_header, header, 12) != 0) { ngx_conf_log_error(NGX_LOG_WARN, cf, 0, "incompatible binary geo range base \"%s\"", name->data); goto failed;