aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-02-21 17:18:03 +0200
committerRiccardo Spagni <ric@spagni.net>2017-02-21 17:18:03 +0200
commit41060f2090dc03808b4a2d5abfac64a52a590f80 (patch)
tree3121019d703ebf94e7b379af7862ab0d22694769
parentMerge pull request #1756 (diff)
parentdns_utils: fix infinite recursion when distributing empty dns_urls (diff)
downloadmonero-41060f2090dc03808b4a2d5abfac64a52a590f80.tar.xz
Merge pull request #1757
5c3badb7 dns_utils: fix infinite recursion when distributing empty dns_urls (anonimal)
-rw-r--r--src/common/dns_utils.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/dns_utils.cpp b/src/common/dns_utils.cpp
index f7655e3c7..19aae93da 100644
--- a/src/common/dns_utils.cpp
+++ b/src/common/dns_utils.cpp
@@ -478,6 +478,9 @@ namespace
bool load_txt_records_from_dns(std::vector<std::string> &good_records, const std::vector<std::string> &dns_urls)
{
+ // Prevent infinite recursion when distributing
+ if (dns_urls.empty()) return false;
+
std::vector<std::vector<std::string> > records;
records.resize(dns_urls.size());