aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/nginx.h4
-rw-r--r--src/core/ngx_regex.c6
-rw-r--r--src/http/ngx_http_variables.c6
3 files changed, 9 insertions, 7 deletions
diff --git a/src/core/nginx.h b/src/core/nginx.h
index f26c6181a..5bcca59f6 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -9,8 +9,8 @@
#define _NGINX_H_INCLUDED_
-#define nginx_version 1023004
-#define NGINX_VERSION "1.23.4"
+#define nginx_version 1025000
+#define NGINX_VERSION "1.25.0"
#define NGINX_VER "nginx/" NGINX_VERSION
#ifdef NGX_BUILD
diff --git a/src/core/ngx_regex.c b/src/core/ngx_regex.c
index bebf3b6a8..91381f499 100644
--- a/src/core/ngx_regex.c
+++ b/src/core/ngx_regex.c
@@ -732,14 +732,14 @@ ngx_regex_create_conf(ngx_cycle_t *cycle)
return NULL;
}
- cln->handler = ngx_regex_cleanup;
- cln->data = rcf;
-
rcf->studies = ngx_list_create(cycle->pool, 8, sizeof(ngx_regex_elt_t));
if (rcf->studies == NULL) {
return NULL;
}
+ cln->handler = ngx_regex_cleanup;
+ cln->data = rcf;
+
ngx_regex_studies = rcf->studies;
return rcf;
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c
index 16ffda3fe..4f0bd0e4b 100644
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -828,7 +828,7 @@ ngx_http_variable_headers_internal(ngx_http_request_t *r,
ngx_http_variable_value_t *v, uintptr_t data, u_char sep)
{
size_t len;
- u_char *p;
+ u_char *p, *end;
ngx_table_elt_t *h, *th;
h = *(ngx_table_elt_t **) ((char *) r + data);
@@ -870,6 +870,8 @@ ngx_http_variable_headers_internal(ngx_http_request_t *r,
v->len = len;
v->data = p;
+ end = p + len;
+
for (th = h; th; th = th->next) {
if (th->hash == 0) {
@@ -878,7 +880,7 @@ ngx_http_variable_headers_internal(ngx_http_request_t *r,
p = ngx_copy(p, th->value.data, th->value.len);
- if (th->next == NULL) {
+ if (p == end) {
break;
}