comparison src/http/modules/ngx_http_geo_module.c @ 3656:3d61601f3171

test binary geo range base size
author Igor Sysoev <igor@sysoev.ru>
date Wed, 30 Jun 2010 10:13:51 +0000
parents ec20f1f93aea
children 564b4ca17cb3
comparison
equal deleted inserted replaced
3655:ec20f1f93aea 3656:3d61601f3171
1230 goto failed; 1230 goto failed;
1231 } 1231 }
1232 1232
1233 header = (ngx_http_geo_header_t *) base; 1233 header = (ngx_http_geo_header_t *) base;
1234 1234
1235 if (ngx_memcmp(&ngx_http_geo_header, header, 12) != 0) { 1235 if (size < 16 || ngx_memcmp(&ngx_http_geo_header, header, 12) != 0) {
1236 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, 1236 ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
1237 "incompatible binary geo range base \"%s\"", name->data); 1237 "incompatible binary geo range base \"%s\"", name->data);
1238 goto failed; 1238 goto failed;
1239 } 1239 }
1240 1240