Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Unified Diff: net/dns/dns_util.cc

Issue 2294343003: Refuse to resolve some types of invalid DNS addresses. (Closed)
Patch Set: Oops Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/dns/dns_util.h ('k') | net/dns/host_resolver_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_util.cc
diff --git a/net/dns/dns_util.cc b/net/dns/dns_util.cc
index 48be035c0e3380d37f5aa0d29e3406760b97db6d..217aedc50010252bde6c50459220751e0163f4c6 100644
--- a/net/dns/dns_util.cc
+++ b/net/dns/dns_util.cc
@@ -83,6 +83,11 @@ bool DNSDomainFromDot(const base::StringPiece& dotted, std::string* out) {
return true;
}
+bool IsValidDNSDomain(const base::StringPiece& dotted) {
+ std::string dns_formatted;
+ return DNSDomainFromDot(dotted, &dns_formatted);
+}
+
std::string DNSDomainToString(const base::StringPiece& domain) {
std::string ret;
« no previous file with comments | « net/dns/dns_util.h ('k') | net/dns/host_resolver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698