diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-02-21 17:18:03 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-02-21 17:18:03 +0200 |
commit | 41060f2090dc03808b4a2d5abfac64a52a590f80 (patch) | |
tree | 3121019d703ebf94e7b379af7862ab0d22694769 | |
parent | Merge pull request #1756 (diff) | |
parent | dns_utils: fix infinite recursion when distributing empty dns_urls (diff) | |
download | monero-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.cpp | 3 |
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()); |