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

Unified Diff: net/dns/host_resolver_impl.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.cc ('k') | net/dns/mock_host_resolver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/host_resolver_impl.cc
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
index 8be7731dee183efba47aacfd2b403b4cded7defb..80c9a8b9e2dcc0e1c41512f4ad7cac00abcbe4c4 100644
--- a/net/dns/host_resolver_impl.cc
+++ b/net/dns/host_resolver_impl.cc
@@ -1919,8 +1919,7 @@ int HostResolverImpl::Resolve(const RequestInfo& info,
DCHECK(out_req);
// Check that the caller supplied a valid hostname to resolve.
- std::string labeled_hostname;
- if (!DNSDomainFromDot(info.hostname(), &labeled_hostname))
+ if (!IsValidDNSDomain(info.hostname()))
return ERR_NAME_NOT_RESOLVED;
LogStartRequest(source_net_log, info);
« no previous file with comments | « net/dns/dns_util.cc ('k') | net/dns/mock_host_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698