From 250a681db6af4462d02de0b85998983158e8cbc5 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 27268299a..3eddede3b 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 {};