From c5a7248b45656b1ca63f9ce35b60ca337f83d3d1 Mon Sep 17 00:00:00 2001 From: "tony@chromium.org" Date: Thu, 3 Dec 2009 23:32:57 +0000 Subject: Fixes to the string MatchPattern functions: 1) Make it explicit that it only supports ASCII (since it iterates character by character). 2) Limit the recursion to 16 levels. We could allow more, but in the case of a ?, it has exponential complexity, so I figured 16 was a good stopping point. It seems rare that someone would have more than 16 '?' and '*'s. BUG=28645 Review URL: http://codereview.chromium.org/460047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33748 0039d316-1c4b-4281-b951-d872f2087c98 --- net/base/mock_host_resolver.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/base/mock_host_resolver.cc') diff --git a/net/base/mock_host_resolver.cc b/net/base/mock_host_resolver.cc index 46772b3..a17ac80 100644 --- a/net/base/mock_host_resolver.cc +++ b/net/base/mock_host_resolver.cc @@ -189,7 +189,7 @@ int RuleBasedHostResolverProc::Resolve(const std::string& host, r->address_family == ADDRESS_FAMILY_UNSPECIFIED || r->address_family == address_family; - if (matches_address_family && MatchPattern(host, r->host_pattern)) { + if (matches_address_family && MatchPatternASCII(host, r->host_pattern)) { if (r->latency_ms != 0) PlatformThread::Sleep(r->latency_ms); -- cgit v1.1