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

Unified Diff: net/base/ssl_false_start_blacklist.cc

Issue 7518035: net: handle trailing dots in LastTwoLabels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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/base/ssl_false_start_blacklist.h ('k') | net/base/ssl_false_start_blacklist_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/ssl_false_start_blacklist.cc
diff --git a/net/base/ssl_false_start_blacklist.cc b/net/base/ssl_false_start_blacklist.cc
index b57826b18608330bc9d2a6e2448505e183bd5182..dd2f614039a15d5f479002aa756d380f0a44cd16 100644
--- a/net/base/ssl_false_start_blacklist.cc
+++ b/net/base/ssl_false_start_blacklist.cc
@@ -8,10 +8,10 @@ namespace net {
// static
bool SSLFalseStartBlacklist::IsMember(const char* host) {
- const char* last_two_labels = LastTwoLabels(host);
- if (!last_two_labels)
+ const std::string last_two_labels = LastTwoLabels(host);
+ if (last_two_labels.empty())
return false;
- const unsigned bucket = Hash(last_two_labels) & (kBuckets - 1);
+ const unsigned bucket = Hash(last_two_labels.c_str()) & (kBuckets - 1);
const uint32 start = kHashTable[bucket];
const uint32 end = kHashTable[bucket + 1];
const size_t len = strlen(host);
« no previous file with comments | « net/base/ssl_false_start_blacklist.h ('k') | net/base/ssl_false_start_blacklist_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698