From bee5edeb315336102f738a26a9bcff5b4d9ff03c Mon Sep 17 00:00:00 2001 From: akallabeth Date: Thu, 19 Jun 2025 19:45:24 +0200 Subject: [PATCH] [core,proxy] fix IPv4 and IPv6 length --- libfreerdp/core/proxy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libfreerdp/core/proxy.c b/libfreerdp/core/proxy.c index 03c0e537e..03b1aeb08 100644 --- a/libfreerdp/core/proxy.c +++ b/libfreerdp/core/proxy.c @@ -919,9 +919,9 @@ static BOOL socks_proxy_connect(rdpContext* context, BIO* bufferedBio, const cha return FALSE; break; - default: - WLog_ERR(TAG, "%s unknown method 0x%x was selected by proxy", logprefix, buf[1]); - return FALSE; + default: + WLog_ERR(TAG, "%s unknown method 0x%x was selected by proxy", logprefix, buf[1]); + return FALSE; } } /* CONN request */ @@ -935,12 +935,12 @@ static BOOL socks_proxy_connect(rdpContext* context, BIO* bufferedBio, const cha if (inet_pton(AF_INET6, hostname, &buf[offset + 1]) == 1) { buf[offset++] = SOCKS_ADDR_IPV6; - offset += 4; + offset += 16; } else if (inet_pton(AF_INET, hostname, &buf[offset + 1]) == 1) { buf[offset++] = SOCKS_ADDR_IPV4; - offset += 16; + offset += 4; } else {