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

Reported by Luis Merino, Markus Vervier, Eric Sesterhenn, X41 D-Sec GmbH.
This commit is contained in:
Maxim Dounin 2021-05-25 15:17:36 +03:00
parent 597d509a1c
commit aeb088ebab
1 changed files with 4 additions and 4 deletions

View File

@ -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) {