Mercurial > dropbear
changeset 1815:5015c80808c5
Use MAX_HOST_LEN for TCP forwarding requests (#121)
tcpip-forward request can include hostname, which is later resolved by getaddrinfo() call.
Dropbear incorrectly assumes tcpip-forward includes only IP(v4) address. Fix this.
author | ValdikSS <iam@valdikss.org.ru> |
---|---|
date | Thu, 18 Mar 2021 16:16:17 +0300 |
parents | 1b160ed94749 |
children | 96d573b40bb4 |
files | svr-tcpfwd.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/svr-tcpfwd.c Mon Mar 08 21:59:10 2021 +0800 +++ b/svr-tcpfwd.c Thu Mar 18 16:16:17 2021 +0300 @@ -146,7 +146,7 @@ TRACE(("enter cancelremotetcp")) bindaddr = buf_getstring(ses.payload, &addrlen); - if (addrlen > MAX_IP_LEN) { + if (addrlen > MAX_HOST_LEN) { TRACE(("addr len too long: %d", addrlen)) goto out; } @@ -181,7 +181,7 @@ TRACE(("enter remotetcpreq")) request_addr = buf_getstring(ses.payload, &addrlen); - if (addrlen > MAX_IP_LEN) { + if (addrlen > MAX_HOST_LEN) { TRACE(("addr len too long: %d", addrlen)) goto out; }