From 3709b2684bb2a83486f13eedc49355c0ae07ccbb Mon Sep 17 00:00:00 2001 From: wowario Date: Tue, 31 Jan 2023 10:11:03 +0300 Subject: [PATCH] correct length of addresses --- src/common/dns_utils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/dns_utils.cpp b/src/common/dns_utils.cpp index 823e74c62..254f21cb3 100644 --- a/src/common/dns_utils.cpp +++ b/src/common/dns_utils.cpp @@ -432,13 +432,13 @@ std::string address_from_txt_record(const std::string& s) if (pos2 != std::string::npos) { // length of address == 95, we can at least validate that much here - if (pos2 - pos == 95) + if (pos2 - pos == 97) { - return s.substr(pos, 95); + return s.substr(pos, 97); } - else if (pos2 - pos == 106) // length of address == 106 --> integrated address + else if (pos2 - pos == 108) // length of address == 106 --> integrated address { - return s.substr(pos, 106); + return s.substr(pos, 108); } } return {};