diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2023-01-26 03:34:44 +0300 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2023-01-26 03:34:44 +0300 |
| commit | f20c6e0eb5820574417106ca5c0863a1ebbe03a7 (patch) | |
| tree | 9fe510456db41d3ac1d5a41219342541e18218df /src/http/ngx_http_core_module.h | |
| parent | 5c18b5bc3fe14aac969d1fb1e383bc696932e1f5 (diff) | |
| download | nginx-f20c6e0eb5820574417106ca5c0863a1ebbe03a7.tar.gz nginx-f20c6e0eb5820574417106ca5c0863a1ebbe03a7.tar.bz2 | |
Fixed handling of very long locations (ticket #2435).
Previously, location prefix length in ngx_http_location_tree_node_t was
stored as "u_char", and therefore location prefixes longer than 255 bytes
were handled incorrectly.
Fix is to use "u_short" instead. With "u_short", prefixes up to 65535 bytes
can be safely used, and this isn't reachable due to NGX_CONF_BUFFER, which
is 4096 bytes.
Diffstat (limited to 'src/http/ngx_http_core_module.h')
| -rw-r--r-- | src/http/ngx_http_core_module.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h index 49bbd4aa9..1c56264c6 100644 --- a/src/http/ngx_http_core_module.h +++ b/src/http/ngx_http_core_module.h @@ -463,8 +463,8 @@ struct ngx_http_location_tree_node_s { ngx_http_core_loc_conf_t *exact; ngx_http_core_loc_conf_t *inclusive; + u_short len; u_char auto_redirect; - u_char len; u_char name[1]; }; |
