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

Unified Diff: net/base/ssl_false_start_blacklist_process.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.cc ('k') | net/base/ssl_false_start_blacklist_unittest.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_process.cc
diff --git a/net/base/ssl_false_start_blacklist_process.cc b/net/base/ssl_false_start_blacklist_process.cc
index 762a665b36188c1a05b3cc1168959521d11fe3b8..2f2f7b90f9907e36589d5720a7771bbfbb79bfd2 100644
--- a/net/base/ssl_false_start_blacklist_process.cc
+++ b/net/base/ssl_false_start_blacklist_process.cc
@@ -113,7 +113,7 @@ static bool CheckLengths(const std::vector<std::string>& hosts) {
fprintf(stderr, "Entry %s is too large\n", i->c_str());
return false;
}
- if (SSLFalseStartBlacklist::LastTwoLabels(i->c_str()) == NULL) {
+ if (SSLFalseStartBlacklist::LastTwoLabels(i->c_str()).empty()) {
fprintf(stderr, "Entry %s contains too few labels\n", i->c_str());
return false;
}
@@ -207,9 +207,9 @@ int main(int argc, char** argv) {
for (std::vector<std::string>::const_iterator
i = hosts.begin(); i != hosts.end(); i++) {
- const char* last_two_labels =
+ const std::string last_two_labels =
SSLFalseStartBlacklist::LastTwoLabels(i->c_str());
- const unsigned h = SSLFalseStartBlacklist::Hash(last_two_labels);
+ const unsigned h = SSLFalseStartBlacklist::Hash(last_two_labels.c_str());
buckets[h & (kBuckets - 1)].push_back(*i);
}
« no previous file with comments | « net/base/ssl_false_start_blacklist.cc ('k') | net/base/ssl_false_start_blacklist_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698