Welcome! Log In Create A New Profile

Advanced

[PATCH] Geo: fix uninitialized memory access

Piotr Sikora via nginx-devel
February 27, 2024 08:24PM
# HG changeset patch
# User Piotr Sikora <piotr@aviatrix.com>
# Date 1708977621 0
# Mon Feb 26 20:00:21 2024 +0000
# Branch patch005
# Node ID fe6f8a72d42970df176ea53f4f0aea16947ba5b8
# Parent 52936793ac076072c3544aa4e27f973d2f8fecda
Geo: fix uninitialized memory access.

Found with MemorySanitizer.

Signed-off-by: Piotr Sikora <piotr@aviatrix.com>

diff -r 52936793ac07 -r fe6f8a72d429 src/http/modules/ngx_http_geo_module.c
--- a/src/http/modules/ngx_http_geo_module.c Mon Feb 26 20:00:19 2024 +0000
+++ b/src/http/modules/ngx_http_geo_module.c Mon Feb 26 20:00:21 2024 +0000
@@ -1259,7 +1259,7 @@
return gvvn->value;
}

- val = ngx_palloc(ctx->pool, sizeof(ngx_http_variable_value_t));
+ val = ngx_pcalloc(ctx->pool, sizeof(ngx_http_variable_value_t));
if (val == NULL) {
return NULL;
}
diff -r 52936793ac07 -r fe6f8a72d429 src/stream/ngx_stream_geo_module.c
--- a/src/stream/ngx_stream_geo_module.c Mon Feb 26 20:00:19 2024 +0000
+++ b/src/stream/ngx_stream_geo_module.c Mon Feb 26 20:00:21 2024 +0000
@@ -1209,7 +1209,7 @@
return gvvn->value;
}

- val = ngx_palloc(ctx->pool, sizeof(ngx_stream_variable_value_t));
+ val = ngx_pcalloc(ctx->pool, sizeof(ngx_stream_variable_value_t));
if (val == NULL) {
return NULL;
}
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Geo: fix uninitialized memory access

Piotr Sikora via nginx-devel 226 February 27, 2024 08:24PM

Re: [PATCH] Geo: fix uninitialized memory access

Roman Arutyunyan 13 March 14, 2024 11:56AM

Re: [PATCH] Geo: fix uninitialized memory access

Piotr Sikora via nginx-devel 12 March 21, 2024 02:46AM

Re: [PATCH] Geo: fix uninitialized memory access

Sergey Kandaurov 19 March 27, 2024 01:50PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 258
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready