Welcome! Log In Create A New Profile

Advanced

[nginx] Resolver: fixed off-by-one write in ngx_resolver_copy().

Maxim Dounin
May 25, 2021 11:34AM
details: https://hg.nginx.org/nginx/rev/2fd40ee19c20
branches:
changeset: 7849:2fd40ee19c20
user: Maxim Dounin <mdounin@mdounin.ru>
date: Tue May 25 15:17:36 2021 +0300
description:
Resolver: fixed off-by-one write in ngx_resolver_copy().

Reported by Luis Merino, Markus Vervier, Eric Sesterhenn, X41 D-Sec GmbH.

diffstat:

src/core/ngx_resolver.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diffs (23 lines):

diff -r 1bde031b59ff -r 2fd40ee19c20 src/core/ngx_resolver.c
--- a/src/core/ngx_resolver.c Mon May 24 21:55:20 2021 +0300
+++ b/src/core/ngx_resolver.c Tue May 25 15:17:36 2021 +0300
@@ -4008,15 +4008,15 @@ done:
n = *src++;

} else {
+ if (dst != name->data) {
+ *dst++ = '.';
+ }
+
ngx_strlow(dst, src, n);
dst += n;
src += n;

n = *src++;
-
- if (n != 0) {
- *dst++ = '.';
- }
}

if (n == 0) {
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Resolver: fixed off-by-one write in ngx_resolver_copy().

Maxim Dounin 135 May 25, 2021 11:34AM



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

Online Users

Guests: 79
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready